In my one asp.net web page by VS 2008 I dynamically creates a set of RadioButtonList and TextBox by objects
rdoList As RadioButtonList = New RadioButtonList() with rdoList.ID = "rdoTask" & ID
The current issue is I can load the web page with a set of RadioButtonLists and TextBoxs but can't find the these dynamically built controls by Me.FindControl("rdoTask" & ID) in aspx.vb file to save info assigned to these controls.
How to solve this issue ? Thanks a lot in advance!
Re-create the controls (using the same original ID) on EVERY postback, and you shouldbe able to use findcontrol() after that.
Thank you for the message. In order to post back, what shouls I do in the code?
A postback occurs usually as a result of some event taking place on the page like a button click, or a slection from a dropdownlist, or text changed in a textbox. So you must have something on your form that's raising an event like a button click for instance; that's going to cause a postback.