ASP.net looping through controls in a table

Posted by c11ada on Stack Overflow See other posts from Stack Overflow or by c11ada
Published on 2010-03-21T19:44:04Z Indexed on 2010/03/21 19:51 UTC
Read the original article Hit count: 211

Filed under:
|

hey all,

i have a table which contains a bunch of dynamically created radio button lists, im trying to write code which will loop through each one of the radio button list and get the text value of the selected item. i have the following code

   foreach ( Control ctrl in Table1.Controls)
    {
        if (ctrl is RadioButtonList)
        {
           //get the text value of the selected radio button 
        }
    }

but i am stuck on how i can get the value of the selected item for that given control.

© Stack Overflow or respective owner

Related posts about radiobuttonlist

Related posts about ASP.NET