G
Giorgio
Hi,
I use successfully the Page.LoadControl(string virtualPath) method (with
*.ascx files) and Control.Render(writer) to create template and then
serialize them into a stringWriter to store the result into a file.
I would like to do the same with some pages (file *.aspx), but i cannot find
a way to load the page file as I do with a *.ascx file (Page.LoadControl
method says that Page is not a Control).
Where is the method? How does the asp.net framework engine (of iis or
cassini) to do this job??
I've found System.Web.UI.PageParser.GetCompiledPageInstance method, but it
doesn't load controls, it only creates an instance of the class with
Controls collection empty (so Page.RenderControl() serialize empty string!)
Thank you
Giorgio
I use successfully the Page.LoadControl(string virtualPath) method (with
*.ascx files) and Control.Render(writer) to create template and then
serialize them into a stringWriter to store the result into a file.
I would like to do the same with some pages (file *.aspx), but i cannot find
a way to load the page file as I do with a *.ascx file (Page.LoadControl
method says that Page is not a Control).
Where is the method? How does the asp.net framework engine (of iis or
cassini) to do this job??
I've found System.Web.UI.PageParser.GetCompiledPageInstance method, but it
doesn't load controls, it only creates an instance of the class with
Controls collection empty (so Page.RenderControl() serialize empty string!)
Thank you
Giorgio