Last post Oct 06, 2009 03:54 PM by mcr_subbu
Oct 07, 2006 09:20 AM|ThePlague|LINK
I'm trying to build a custom page template parser which reads an html file from disk
and replaces the custom tags defined by my prefix such as
<mytagprefix:footer> with the respective contents on the aspx file, the controls placed
inside a panel which has the same tag name like
<panel id="mytagprefix_main"> or
<panel id="mytagprefix_footer"> would render at the specified place on the html template file.
now, I can't use server controls on that, I tried a datagrid but I get:
"must be placed inside a form tag with runat=server."
how can I make the parser render a server from from that html template? adding
runat="server" on the html template has no effect, I tried to wrap up the component
on the aspx file with a <form runat="server"> but this would cause some components
to not render correctly when the template is parsed. any ideas on this or do you guys
know a better template parser solution?
Oct 07, 2006 10:40 AM|ThePlague|LINK
or even better, if I use a MasterPage, is there a way to replace the HTML on the master
on the fly? this way I could load some html from the file and insert the ContentPlaceHolders
on the desired places... any ideas?
Oct 07, 2006 03:11 PM|ThePlague|LINK
if I replace the whole template html code with the code from an external html file the runat="server" magic is gone, I'm using the "override void Render" to achive this, I have no clue on how to get server controls that require a runat="server" form to work
with my approach, do you guys have any tip for me?
Oct 07, 2006 10:03 PM|ThePlague|LINK
Oct 06, 2009 03:54 PM|mcr_subbu|LINK
Hi. I am facing the same problem now. Dod you get any solution for this?