Http://www.cnblogs.com/summers/archive/2013/07/31/3227234.html
What is the difference between the use of radio buttons radiobutton,radiobuttonlist in. NET and radio in pure HTML?
RadioButton Example and Description:
<asp:radiobutton id= "Publichas" checked= "true" runat= "Server" cssclass= "Radiomiddle" text= "everyone Visible" groupname= "MM"/ >
<asp:radiobutton id= "Privatehas" runat= "Server" cssclass= "Radiomiddle" text= "only self-visible" groupname= "mm"/>
<asp:radiobutton id= "Friendhas" runat= "Server" cssclass= "Radiomiddle" text= "only friends visible" groupname= "mm"/>
. NET Background Processing mode:
if (privatehas.checked = = True)
Model. Limits = 0;
if (friendhas.checked = = True)
Model. Limits = 1;
if (publichas.checked = = True)
Model. Limits = 2;
RadioButtonList is similar to DropDownList usage in. NET and can be seen as a collection:
<asp:radiobuttonlist id= "rbimg" name= "rbimg" runat= "server" repeatdirection= "Horizontal"
repeatlayout= "Flow" >
<asp:listitem value= "1" > Yes </asp:ListItem>
<asp:listitem value= "0" selected= "True" > No </asp:ListItem>
</asp:RadioButtonList>
. NET Background Processing mode:
This.radCid.SelectedValue = Project. Cid;
Radio
Set name to the same value
<input type= "Radio" name= "Sex" value= "1" checked= "checked" ></input> male
<input type= "Radio" name= "Sex" value= "0" ></input> female
. NET Background Processing mode:
by request.form["Sex"]. ToString (); get
. NET radio button Radiobutton,radiobuttonlist and radio usage examples in plain HTML?