-
How to save the to be generated HTML page onto the client's disk in ASP .NET 2.0?
Hi All,
My question is as follows:
I have a text box and two links.Let the two links be - Show and Save .
On clicking the Show , a web page is generated by fetching some data from database according to the input in the textbox and the web page is displayed to the user.
Now on clicking Save also, with the same input to the textbox, the same set of data will be fetched from the database, but in this case I do not want the web page generated to be displayed to the user, but want a Save dialog box to appear, which the user uses to select any location on his/her system to save the web page generated as HTML format.
How can I achieve this i.e. how can I save a page which will be generated on clicking the link without first displaying it to the user.
I have seen code where there is a button in the second web page which can be clicked to save the same page, but I not getting any thing to save the page which will be generated and saved directly.
I am using ASP .NET with VB .
Please provide my some solution.
Thanks
Pawan
-
You'll want to do something like the first item, "Capture Current Page Content", on this page: http://www.west-wind.com/weblog/posts/481.aspx
Once you have the desired output in a string, write it to the Response.OutputStream: http://www.aspnetmime.com/tutorials/...ToBrowser.aspx
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Thanks
I will study the tutorial. It is looking good.
Pawan
Similar Threads
-
By jennywongus in forum .NET
Replies: 2
Last Post: 02-21-2006, 11:33 PM
-
By Syed Hameed in forum ASP.NET
Replies: 2
Last Post: 11-05-2001, 04:32 PM
-
By John Whitney in forum Web
Replies: 0
Last Post: 01-31-2001, 03:30 PM
-
By Phong Tran in forum Web
Replies: 0
Last Post: 01-23-2001, 08:55 PM
-
By Phong Tran in forum XML
Replies: 0
Last Post: 01-22-2001, 04:59 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|