Cannot get radioButtonList selection

V

VR

Hi, I'm developing a Web User Control and I put a RadioButtonList control
bound to a data source, set it's .dataSource, .dataTextField and
..dataValueField properties and when looking in IE's view source everything
is Ok (the control's and list's values) but when I submit it to the server
(I set autoPostBack = true) I cannot read the selection.

I'm trying to read it from my control's codeBehind file not from the WebForm
Container code behind and all I get is:

..selectedValue = ""
..selectedIndex = -1
..selectedItem = Nothing

PS: I declared the radioButtonList object in the code behind file with
Protected and WithEvents modifiers.

If someone knows anything that could help me...


Thanks a lot,
Victor
 
V

VR

After trying a lot of ways to solve my problem I found that I could retreive
the selectedValue using Request(rblList.UniqueID) but, let's say, I'm
getting my control's selected value from outside ASP.Net framework page
processing that should automatically make the selected value available to
server code using the object property, correct?


regards,
Victor
 
K

kainhart

I have the same problem actually and I haven't gotten anywhere in abou
3 days trying to figure it out. It seems that it must be pag
life-cycle problem but I can't seem to figure it out. To Complicat
things too, it seems that implementing particular interfaces such a
IPostBackDataHandler actually change the ordering in whic
CreateChildControls is called. This problem is quickly showing
weakness of ASP.NET in presenting a simple programming model to th
developer


-
kainhar
 

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

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top