By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,077 Members | 1,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,077 IT Pros & Developers. It's quick & easy.

dynamic radio button text in page load

P: n/a
hi
i am creating many radio RadioButtonList dynamically in page load.its
working find.now i want to select a text in radio button(Autopostback is true
for radio buttonlist) and find that text in page load using break point.i am
able to get control ID by using
string syscontrol = (string)Request.Form["__EVENTTARGET"];
how to find the selecte text.

please help me.i cannot do radiobuttonlist1.selecteditem.text because i am
creating control in page load only.
Feb 2 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
__EVENTARGET is filled in by javascript by an autopostback control when
it posts back. it is the name of the control. radio buttons only
postback their value (if selected), not text.

if you are dynamically creating controls, you should do it in on init.
in session (or viewstate) store enough info to recreate on postback.
then in page load you can just get the value.

-- bruce (sqlwork.com)

prabhu_27_84 wrote:
hi
i am creating many radio RadioButtonList dynamically in page load.its
working find.now i want to select a text in radio button(Autopostback is true
for radio buttonlist) and find that text in page load using break point.i am
able to get control ID by using
string syscontrol = (string)Request.Form["__EVENTTARGET"];
how to find the selecte text.

please help me.i cannot do radiobuttonlist1.selecteditem.text because i am
creating control in page load only.
Feb 2 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.