RadioButtonList control example

RadioButtonList control example

Previous Home Next

 

A RadioButtonList can be used to select 1 option within several options

 
   

   

 ..................Desigining code for RadioButtonList control......
....................................................................

        bcom
        B.A
        BBA
        BCA
        B.Sc
        B.Tech
        B.Pharma
    
..................................................................
....................................................................
.................cs code for button clic............................


protected void Button1_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < 7; i++)
        {
            if (RadioButtonList1.Items[i].Selected)
                TextBox1.Text = RadioButtonList1.Items[i].Text.ToString();
        
        }
    }
......................................................................
Previous Home Next