help (please!) with repeater controls

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top