|
-
Apr 10th, 2001, 03:46 PM
#1
Thread Starter
Frenzied Member
I hate looking around MSDN. I've been poking around for a little while now and I can't find what i"m looking for.
I'm hoping there is a Response.Save or something. I want to write the entire HTML doc to a file on the server side, incase the broswing user wants to save it. I'd hate to have to write everyline to Response.Write and then to a filehandle. I'm hoping I can just save the entire doc.
Any ideas?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Apr 10th, 2001, 05:37 PM
#2
PowerPoster
I don't think you can. I have had to use the response.write method before myself.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Apr 11th, 2001, 08:21 AM
#3
Thread Starter
Frenzied Member
So every line has to be written twice...
Code:
<%
if intAvailPercent < intSLAThreshold then
Response.Write("The availability of " & intAvailPercent & "% was below target.")
Write FH "The availability of " & intAvailPercent & "% was below target."
end if
%>
'Course I could just dump each line into a string and write that string to Response and then to the file, make the computer do the concatenation just once. But still, having to write everything to two files sucks.
And I can't use CSS or XSL.
I guess I could just write to one file and not to Response, and then do a redirect to the file since it will be an HTML file in an IIS virtual directory.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Apr 11th, 2001, 08:38 AM
#4
Why do that when all they have to do is select File/Save As? Or you could probably find some javascript that will do it for you.
-
Apr 11th, 2001, 08:46 AM
#5
Lively Member
Redirect
Cyber,
R u using IIS5.0, if so instead of redirect use server.transfer or server.execute. This doesnt involve another round trip to the client and back to the server.
If IIS4.0 then redirect is your only option unless you open the saved text file with the scripting object and response.write(fileObject.readall)
-
Apr 11th, 2001, 09:45 AM
#6
Thread Starter
Frenzied Member
Cander, it has to be saved server side, so they can publish the report after they customize it.
Steve, we are requiring the version that shipped in the NT 4 Options Pack. I don't remember which version that is, since I'm in charge of W2K complaince, and am doing all my work on a W2K box, though I may not mind the readall method. I hadn't planned on using FSO, just a open/write/close.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Apr 11th, 2001, 09:51 AM
#7
PowerPoster
Yeah, i think you are kind of stuck in a corner then...
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
-
Apr 11th, 2001, 09:54 AM
#8
Lively Member
Whats the reason for not using fso?? Its an inbuilt Com+ component. Super efficient. unlike open read write to files
-
Apr 11th, 2001, 10:16 AM
#9
The only other option I can think of would be to write the page then have it redirect to the page just created?!?!
-
Apr 11th, 2001, 10:18 AM
#10
PowerPoster
Yeah, because i don't think you could save a page that is open using FSO.
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
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
|
Click Here to Expand Forum to Full Width
|