Submit a Blog
Member - { Blog Details }

hero image

blog address: http://findnerd.com/list/view/Problem-in-selecting-Radio-Button-inside-Repeater-Control/3302

keywords: Select RadioButton Inside Repeater, RadioButton Inside Repeater, dot net

member since: Dec 21, 2015 | Viewed: 48

Problem in selecting Radio Button inside Repeater Control

Category: Technology

Incase we are using RadioButton inside a Repeater, one common problem which we face is that we are not able to select single RadioButton, i.e. If we select one RadioButton, and then click on the other the other also gets selected without unselecting the first one. Even the GroupName property of the RadioButton dosen't works for this. The solution I got is: 1. Set the AutoPostBack property of the RadioButton to "true". 2. Make OnCheckedChanged event for the RadioButton. Example: 3. Inside OnCheckedChanged event write the following code: protected void rbtnSelectEmp_OnCheckedChanged(object sender, EventArgs e) { foreach (RepeaterItem item in rptEmployee.Items) { RadioButton rbtn = (RadioButton)item.FindControl("rbtnSelectEmp"); ... See more at: http://findnerd.com/list/view/Problem-in-selecting-Radio-Button-inside-Repeater-Control/3302



{ More Related Blogs }