-
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?
-
I don't think you can. I have had to use the response.write method before myself.
-
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.
-
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.
-
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)
-
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.
-
Yeah, i think you are kind of stuck in a corner then...:rolleyes:
-
Whats the reason for not using fso?? Its an inbuilt Com+ component. Super efficient. unlike open read write to files
-
The only other option I can think of would be to write the page then have it redirect to the page just created?!?!
-
Yeah, because i don't think you could save a page that is open using FSO.:confused: