DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to save the to be generated HTML page onto the client's disk in ASP .NET 2.0?

  1. #1
    Join Date
    Feb 2007
    Posts
    43

    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

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    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!

  3. #3
    Join Date
    Feb 2007
    Posts
    43
    Thanks
    I will study the tutorial. It is looking good.

    Pawan

Similar Threads

  1. How to configure .NET VS 2003 to use .net 2.0
    By jennywongus in forum .NET
    Replies: 2
    Last Post: 02-21-2006, 11:33 PM
  2. what software do I need to run ASP .NET page?
    By Syed Hameed in forum ASP.NET
    Replies: 2
    Last Post: 11-05-2001, 04:32 PM
  3. Printing Large HTML Table from ASP page
    By John Whitney in forum Web
    Replies: 0
    Last Post: 01-31-2001, 03:30 PM
  4. Replies: 0
    Last Post: 01-23-2001, 08:55 PM
  5. 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center