for eg. if the constructor for the control you want to load looks like this
public myUserControl (string s, bool b, int i){// constructor code here}
// as you can see there are 3 arguments for the constructor.
// One thing to be careful about is that you need to pass the arguments in
the same order they are
// listed in your constructor, and the type of the objects in your object
array should match,
// so as in the following code.
object[] myParameters = {"test", true, 3};
myUserControl c1 = LoadControl(myUserControl, myParameters);
Regards,
Alessandro Zifiglio
http://www.AsyncUI.net
> has anybody used this type of loading user controls,
>
[quoted text clipped - 5 lines]
>
> thanks.
Alessandro Zifiglio - 13 Jul 2006 12:59 GMT
Also, dont forget to check the relevent documentation. Its pretty clear in
what you need to do :
http://msdn2.microsoft.com/en-us/library/ewtd66a0.aspx
Regards,
Alessandro Zifiglio
http://www.AsyncUI.net
> for eg. if the constructor for the control you want to load looks like
> this :
[quoted text clipped - 25 lines]
>>
>> thanks.