Simple application of the. NET control RadioButtonList

Source: Internet
Author: User

1.radiobuttonlist controls whether the control is displayed in portrait or landscape orientation through the RepeatDirection property.

2.radiobuttonlist has an important time called the OnSelectedIndexChanged event, which must be used in conjunction with the property AutoPostBack.

3. Application:

First, you can hide some of the controls above the foreground code, which must be hidden from the visiable (hidden in style is not good, the background cannot be controlled, or the hidden in style may need another way to control it in the background)

With the OnSelectedIndexChanged event in RadioButtonList, the hidden part is displayed according to the selected button, and the following is the code.

1 protected voidChose_selectedindexchanged (ObjectSender,eventargs e)2 {3   if(radiobuttonlist2.text=="have purchased")4       {5          This. labcheckboxtitle1.visiable=true;6          This. labcheckboxtitle2.visable=true;7       }8 Else9 {Ten      This. labcheckboxtitle1.visiable=false; One  This. labcheckboxtitle2.visable=false; A } -}
View Code

Simple application of the. NET control RadioButtonList

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.