JavaScript - I want to print the content of aspx page to a word document using javascript?

Asked By karur krishna madhu on 12-Aug-13 03:06 AM
I want to print the content of aspx page  to a word document using javascript? any suggestions please?
Robbe Morris replied to karur krishna madhu on 12-Aug-13 08:50 AM
The issue you have here is that you'd need to make an HttpWebRequest to the page, save it to htm, and then attempt to open it in Microsoft Word "on the server".

Not know for sure how your pages are configured, you could try grabbing the html string that comes from various containers with a method for .RenderControl, grab the html stream and perform the same as above.  But, it would take into account any JavaScript that you have running in the page.