How to save webpage to client machine in asp.net
-
I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event
-
I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event
You want to save the page content in client system when user click on save button on you page?
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net My Latest Article : IIS Remote Debugging
-
You want to save the page content in client system when user click on save button on you page?
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net My Latest Article : IIS Remote Debugging
yes
-
I have a some report messages in a content place holder within a master page in .aspx page. I want to put a "Save Button" on my page, which saves the webpage to user's computer (just like "SaveAs File dialog box" in windows application". Can anybody tell me how do I save a webpage in .txt or .pdf or .doc or .htm format (any of theses) on button click event
When they push the button, you render the content of the page to a stream and pass that with a content header to say it's a file. To save as anything other than plain text, requires more work, a third party add in, or the Microsoft tools for office. htm is easy, that's what you were sending in the first place, so you don't need to reformat it at all, just stream it.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.