Click here to Skip to main content
16,016,140 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i have displayed multiple dynamic radiobuttonlist controls equal to the no of records in the table, i have added two items like P and A in each radiobutton list control, and i added static button control also in the web form.

Now i want........ when i click the button, selected text in the each radiobutton list, must be updated in the table in database with their respective id in the table. please help me as soon as possible
Posted

1 solution

C#
string selectedTexts = String.Empty;
            foreach (ListItem itm in rdList.Items)
            {
                selectedTexts += itm.Selected == true ? "," + itm.Text : String.Empty;
            }
            selectedTexts = selectedTexts.Length > 0 ? selectedTexts.Substring(1) : String.Empty;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900