M
MattB
I fixed my "can't get the textbox.text" issue by making sure I was only
binding the repeater on the first load of the page (if Not IsPostBack). Now
I'm adding other controls to my repeater and am having more trouble (like my
issues are REPEATING).
I've added a RadioButtonList that I'm binding during he OnItemDatabound
event of the repeater. The display looks like I'd want it. But when the form
is submitted if I use FindControl as I did with the textbox, I get a Null
Reference error when I try to access the RBList.SelectedValue property, and
there was a selected value when I submitted the form. I've double-checked to
be sure I'm only binding that control once (If Not IsPostBack).
But plain, un-bound controls seem to work fine (single checkboxes or
TextBoxes) and I can access their properties when the form is submitted. As
a work-around, I tried to just place single RadioButtons in the repeater and
give them a common GroupName. Again, that displayed fine, but I can't even
find a single checkbox in the repeater using FindControl (always returns
"Nothing"). So I'm thinking that when grouped, RadioButtons are really a
child of the group, but what exactly IS the group so I can try to write code
to find that?
If anyone has any suggestions for getting any of these solutions to work
so I can access a bound control's properties or the individual RadioButtons
inside a group, please let me know. This is killing me! (not to mention
making the project take WAY too long)
Thanks!
Matt
binding the repeater on the first load of the page (if Not IsPostBack). Now
I'm adding other controls to my repeater and am having more trouble (like my
issues are REPEATING).
I've added a RadioButtonList that I'm binding during he OnItemDatabound
event of the repeater. The display looks like I'd want it. But when the form
is submitted if I use FindControl as I did with the textbox, I get a Null
Reference error when I try to access the RBList.SelectedValue property, and
there was a selected value when I submitted the form. I've double-checked to
be sure I'm only binding that control once (If Not IsPostBack).
But plain, un-bound controls seem to work fine (single checkboxes or
TextBoxes) and I can access their properties when the form is submitted. As
a work-around, I tried to just place single RadioButtons in the repeater and
give them a common GroupName. Again, that displayed fine, but I can't even
find a single checkbox in the repeater using FindControl (always returns
"Nothing"). So I'm thinking that when grouped, RadioButtons are really a
child of the group, but what exactly IS the group so I can try to write code
to find that?
If anyone has any suggestions for getting any of these solutions to work
so I can access a bound control's properties or the individual RadioButtons
inside a group, please let me know. This is killing me! (not to mention
making the project take WAY too long)
Thanks!
Matt