. NET radio button Radiobutton,radiobuttonlist and radio usage examples in plain HTML?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.