Posted on: 1/10/2014 3:54:40 AM | Views : 564

I tried to convert aspx output to .html file.
Dim filename As String = Server.MapPath("~/Docs/TestWeb.html") Dim MainContent As ContentPlaceHolder = Page.Master.FindControl("Content_Body") Dim sbOut As StringBuilder = New StringBuilder() Dim sWriter As StreamWriter = File.CreateText(filename) Dim swOut As StringWriter = New StringWriter(sbOut) Dim htwOut As HtmlTextWriter = New HtmlTextWriter(swOut) MainContent.RenderControl(htwOut) sWriter.WriteLine(swOut.ToString()) sWriter.Close() html file is getting created, but it loses all styles and formatting of all controls in the aspx page. How can I get this controls as in aspx page?? can anyone please help me.

Go to the complete details ...