Forum Moderators: open

Message Too Old, No Replies

retrieving values of dynamic control from user control

         

priteshgupta

5:21 am on Nov 26, 2008 (gmt 0)

10+ Year Member



hi all...
I want to know how to retrieving values of dynamic control from user control like I have defined a usercontrol containing the dropdownlist.I want to retrive the value selected by the user on someotherpage.aspx....
plz tell me how to do this

darrenG

12:25 pm on Feb 13, 2009 (gmt 0)

10+ Year Member



Way, way old topic, but I'm bored at work so what the hell!

You can either use dropdownlist = myControl.FindControl("myDropDownList")

Or the more 'proper' way, set up property in your control, which references the selected item of the dropdownlist:

Public Property SelectedItem as ListItem

get
return dropDownList.SelectedItem
end get

....