Hi Siva,
Thanks for your inquiry. You can get the HTML representation of your ASPX page and then save that HTML to a Word document or even to PDF format by using Aspose.Words for .NET. Please see the following code snippet:
protected override void Render(HtmlTextWriter output)
{
// Get HTML of the page
System.IO.StringWriter oStringWriter = new StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);
base.Render(oHtmlTextWriter);
StringReader reader = new StringReader(oStringWriter.ToString());
MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(reader.ReadToEnd()));
Document doc = new Document(stream);
doc.Save(Response, "ASPX to PDF.docx", ContentDisposition.Inline, null);
}
I hope, this helps.
Best regards,