I have a template for Html page, and I need to add its contents dynamically in ASP.NET. I also need to make many instences of template page, depending in data.
Its obvious that creating large Html using strings is very dirty way. So I choosed to generate my Html using HtmlGenericControl. And i made it. But I cant get the generated Html as string from it.
Its simple to add these controls in ASP.NET pages and get rendered, but I need their Html.
If its not possible, is there any other structrued way of generating Html...???
Trick told by @Bartdude worked like a charm...
For other peoples, solution goes in this way...
Hope this helps for coming readers...:)