Loading ASP.NET Custom Controls by Type and Transfer Parameters?
Possible duplicate:
Asp.net Usercontrol LoadControl error
In ASP.NET 2.0, I understand that although an API existed to load a custom control by type, it didn't actually work.
Or at least I've never been able to get it to work, and I know from blogs that others have had similar problems.
So, I use a wrapper type that provides the functionality I need by calling the appropriate control constructor using reflection.
Has ASP.NET 3.5 made it easier to load custom controls by type and passing parameters?
Edit:
Further clarification ....
There are two overloads for the TemplateControl.LoadControl method:
Control TemplateControl.LoadControl(Type t, object[] params) and,
Control TemplateControl.LoadControl(string virtualPath)
My question: in ASP.NET 2.0, the first overload didn't seem to work. Does anyone know if this method really does not work and if it was fixed in ASP.NET 3.5.
I will be testing this myself tomorrow and update the question with the answer if no one knows.
source to share