Load ASP.Net controls from text file / database
-
I am working on trying to load some control code that is saved in a text file. The code is constructed of ASP.Net controls but could consist of any type of control from PlaceHolder, LliteralControl, TextBox, etc. How can I load this into a control located on the page? for example, I could pull this from a file or database. Control c = new Control(); //How to get raw text to control and add control to page??? c.???? Page.Controls.Add(c);
-
I am working on trying to load some control code that is saved in a text file. The code is constructed of ASP.Net controls but could consist of any type of control from PlaceHolder, LliteralControl, TextBox, etc. How can I load this into a control located on the page? for example, I could pull this from a file or database. Control c = new Control(); //How to get raw text to control and add control to page??? c.???? Page.Controls.Add(c);