[thelist] LoadControl() when control is not a file

Casey Crookston caseyc at IntelliSoftmn.com
Fri Apr 13 14:19:37 CDT 2007



On my most recent project, I have successfully loaded multiple dynamic
controls onto a page using LoadControl(usercontrol.ascx).  Each time a
control was loaded, I gave it an id as such:  New_control.ID = "ctrl" +


Now, however, I need to go back and gather some of the user input from
these controls.  I'm pretty sure I again need to use the LoadControl()
method, but instead of referencing an actual control file, I need to
reference a control already on the page.  I'm not sure how to do this.


According to the little popup window on VS2005, LoadControl() has two
methods.  The first is LoadControl( virtual path as string) - not what I
need this time around, or: LoadControl( t as Systrem.Type, parameters()
as Object)


I have no idea what this second one means.   And, how would I use this
to load controls that were previously added to the page dynamically?  


Thanks, Casey



More information about the thelist mailing list