c# - How to prevent to other checkboxes checked when one checkbox is checked in ASP.NET -


I have a project that uses two checkboxes. When a checkbox is checked then the other can not be checked. In short, I do not want to use two checkboxes at the same time.

Here is the .aspx code:

  & lt; Td> & Lt; Asp: checkbox run = "server" id = "chocolate" text = "loci" autopostback = "true" on checked changes = "choccollectan_hecked changed" on client click = "show popup ()" /> gt; & Lt; / Td> Here is the .cs code:  
  Protected Zero ChckLctn_CheckedChanged (Object Sender, EventArgs e) {if (ChckLctn.Checked == true & amp;; ChckBrm.Checked == Incorrect) {Locacier Dildar (); }} Protected Zero ChckBrm_CheckedChanged (Object Sender, EventArgs E) {If (ChckLctn.Checked == Incorrect & ChckBrm.Checked == true) {BirimleriDoldur (); }}  

How can I do this?

Instead of the checkbox , this is what they design for You can use to specify which radio-buttons are simultaneously.

  & lt; Asp: RadioButton id = "Radio1" GroupName = "RegularMenu" Text = "Beef" BackColor = "Pink" runat = "Server" /> & Lt; Br / & gt; & Lt; ASP: RadioButton ID = "Radio 2" groupname = "regular menu" text = "pork" backender = "pink" run = "server" /> & Lt; Br / & gt; & Lt; Asp: RadioButton id = "Radio3" GroupName = "regular menu" text = "fish" backlender = "pink" run = "server" />  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -