jeudi 22 septembre 2016

BootStrap Checkbox “is checked” and always return FALSE whith asp - C#

i need hlep in this issue i make checkbox for days and even i checked the checkbox to know in C# if it true or false every time return false please check the Code below ..

please help

i need hlep in this issue i make checkbox for days and even i checked the checkbox to know in C# if it true or false every time return false please check the Code below .. please help

BootStrap Code

<form class="form-horizontal" role="form">
<div class="checkbox checkbox-primary">
<input runat="server" id="checkStar" type="checkbox" data-provide="checkbox"  />
<label for="checkbox2">
Saturday
</label>
             </div>

<div class="checkbox checkbox-primary">
<input runat="server" id="checkSun" type="checkbox"/>

<label for="checkbox2">
Sunday
</label>
</div>    

<div class="checkbox checkbox-primary">
<input runat="server" id="checkmon" type="checkbox" />
<label for="checkbox2">
  monday
</label>
</div>
 <div class="checkbox checkbox-primary">                                   <input  runat="server" id="chectu" type="checkbox"/>
     <label for="checkbox2">
              tuesday 
  </label>
</div>
<div class="checkbox checkbox-primary">
<input  runat="server" id="checwe" type="checkbox"/>
<label for="checkbox2">
 thursday
 </label>
 </div> 

 </form>

c# Code

    if (checkStar.Checked == false & checkmon.Checked == false & chectu.Checked == false & checwe.Checked == false)
                {

                    textbox1.text="please select one day";
    retuern;
                }




Aucun commentaire:

Enregistrer un commentaire