473,388 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Writing Response to a file

GSK
I figure this should be simple if it is possible:

Let's say I have an .aspx that outputs a receipt, or the contents of a form,
etc., and I want to save the rendered HTML into a file for future reference.
Is there an easy way to do this? (This is not what I am actually trying to
do, but it is the process of writing the response to a file that I am
interested in)

I am familiar with using WebRequest to grab the output from another URL, but
this is different. (and should be easier IMO as you are capturing the same
content that is being rendered in the browser)

Thanks!

- gsk.
Nov 18 '05 #1
3 1122
Hi gsk,

You can get the out of the page by overriding the Render method of the page,
of course this is a problem if it's not your own page you want to save the
HTML for. For a remote site's page this is not possible of course.

Hope this answers your question
Cheers
Cristian
"GSK" <gs*@NiOcSaP.nAeMt> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
I figure this should be simple if it is possible:

Let's say I have an .aspx that outputs a receipt, or the contents of a form, etc., and I want to save the rendered HTML into a file for future reference. Is there an easy way to do this? (This is not what I am actually trying to
do, but it is the process of writing the response to a file that I am
interested in)

I am familiar with using WebRequest to grab the output from another URL, but this is different. (and should be easier IMO as you are capturing the same
content that is being rendered in the browser)

Thanks!

- gsk.

Nov 18 '05 #2
Rick Strahl discusses this in his blog:

http://west-wind.com/weblog/

Tuesday, June 08, 2004
Capturing Output from ASP.Net Pages

--
Joe Fallon

"GSK" <gs*@NiOcSaP.nAeMt> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
I figure this should be simple if it is possible:

Let's say I have an .aspx that outputs a receipt, or the contents of a form, etc., and I want to save the rendered HTML into a file for future reference. Is there an easy way to do this? (This is not what I am actually trying to
do, but it is the process of writing the response to a file that I am
interested in)

I am familiar with using WebRequest to grab the output from another URL, but this is different. (and should be easier IMO as you are capturing the same
content that is being rendered in the browser)

Thanks!

- gsk.

Nov 18 '05 #3
GSK
Thanks guys, exactly what I was looking for.

- gsk.

"Joe Fallon" <jf******@nospamtwcny.rr.com> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
Rick Strahl discusses this in his blog:

http://west-wind.com/weblog/

Tuesday, June 08, 2004
Capturing Output from ASP.Net Pages

--
Joe Fallon

"GSK" <gs*@NiOcSaP.nAeMt> wrote in message
news:ez**************@tk2msftngp13.phx.gbl...
I figure this should be simple if it is possible:

Let's say I have an .aspx that outputs a receipt, or the contents of a

form,
etc., and I want to save the rendered HTML into a file for future

reference.
Is there an easy way to do this? (This is not what I am actually trying to do, but it is the process of writing the response to a file that I am
interested in)

I am familiar with using WebRequest to grab the output from another URL,

but
this is different. (and should be easier IMO as you are capturing the same content that is being rendered in the browser)

Thanks!

- gsk.


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: MB | last post by:
I am writing an FTP Client using the NIO packages because I want to use the non-blocking functionality. I have done this successfully except for the fact that after I "put" an image file to the...
20
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
7
by: Brian Burgess | last post by:
Hi all, Anyone see anything wrong with the following: *************************************************************** <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit Dim nAcctNbr Dim...
6
by: Mark Sargent | last post by:
Hi All, been away from developing, if you can call what I do that, and am stumped already..lol..see code below. I'm trying to get each row to display, based on the if statements. Hope you can...
2
by: Joseph | last post by:
Hello. I have this problem. See I have a transformed XML file and I checked its contents prior to outputting it to excel file via responseset. here is the gist of the code: XmlReader reader =...
2
by: | last post by:
Hello All, I am writing a web application that reads a bitmap from a file and outputing it to a HTTP response stream to return the image to the requesting client. The image file is a regular...
4
by: David | last post by:
Hi all, I am trying to write a class file, but am not quite sure what I am doing. What I want to do is from within an ASP page is to call a class. The class must then create a text file...
7
by: W. Jordan | last post by:
Hello, I am using Response.WriteFile (filename) to write a file that on the server to my web client. I discover that the while a client request a big file, for example, a 14m-bytes one, the...
6
by: Adam Honek | last post by:
Can anyone spot why the below function is failing? It returns true but when looking inside the INI file there's no new added section. ****CODE**** Public Function WriteINIFileSection(ByVal...
1
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.