I was wondering if it was possible to load a asp.net control (.ascx) that doesn't reside on the file system?
Like say a string variable?
I was wondering if it was possible to load a asp.net control (.ascx) that doesn't reside on the file system?
Like say a string variable?
System.Reflection.Emit
Assembly.Load(byte[])
No designer for you if you do this though.
Not a string varible but you can load it from resources or zip file, but you have to have full trust. Google for VirtualPathProvider.
You could try this:
string controlString = //read or build it
Control control = this.Page.TemplateControl.ParseControl(controlString);
More information is available here: