I tried the following code:
For Each question As DataListItem In Me.datQuestions.Items
System.Diagnostics.Debug.WriteLine(CType(question.FindControl("rblQuestions"),RadioButtonList).SelectedValue)NextBut it returned nothing. I think the reason I am having so much trouble isbecause of the ID that is generated when the page is created. I know thatthere is a way to programmatically determine this using the ClientIDproperty. What change do I need to make to my code? Thanks.--Nathan (e-mail address removed)://
www.nathansokalski.com/"brians[MCSD]" <
[email protected]> wrote in messagenews:
[email protected]...> Hello Nathan,>> You don't need the foreach loop. You can use RadioButtonList.SelectedItem> and/or RadioButtonList.SelectedIndex to determine the selectedradiobutton.>> --> brians>
http://www.limbertech.com>>> "Nathan Sokalski" wrote:>>> I have a RadioButtonList as one of the Controls in the ItemTemplate of my>> DataList. I am using a For Each loop to go through the Items property,but>> even if one of the RadioButtons has been selected, they all return False.>> What am I doing wrong? Thanks.>> -->> Nathan Sokalski>> (e-mail address removed)>>
http://www.nathansokalski.com/>>>>>>