17 February 2014

Radio Button List and Check Box List - Basic Web Controls

       A radio button list presents a list of mutually exclusive options. A check box list presents a list of independent options. These controls contain a collection of List Item objects that could be referred to through the Items property of the control.
Basic syntax for radio button list:
<asp:radiobuttonlisId="Radiobuttonlist1"runat="server"autopostback="true"  OnSleectedIndexChanged="Radiobuttonlist1_selectedindexchanged">
</asp: radiobuttonlist>
Basic syntax for check box list:
<asp:CheckboxlistId="CheckboxList1"Runat="Server"Autopostback="true" OnSleectedIndexChanged="CheckboxList1_selectedindexchanged"></asp:Checkboxlist >
Common Properties of Check Box and Radio Button Lists:
      Repeat Layout:This attribute specifies whether the table tags or the normal html flow to user while formatting the list when it is rendered.The default is table


     Repeat Direction:It specifies the direction in which the controls to be repeated.the values available are horizontal and vertical

    Repeat Columns:It specifies the number of columns to use when repeating the controls ,default is 0

No comments:

Post a Comment