General discussion

Locked

Programatically stores source of ASP pag

By ivanheng ·
I've created an ASP page. How do I store the generated HTML source by the server to an HTML file? Is there a particular command I can use?

Thanks

Ivan

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Programatically stores source of ASP pag

by jscragg In reply to Programatically stores so ...

ASP is a translated language, not a compiled language. Therefore, the script is translated into HTML every time the server processes the page.

If you really want to save the HTML page, run the script once in your browser, and choose "View" > "Source" from your browser menu to open a listing of the HTML page in your default text editor. Then save the page.

Collapse -

Programatically stores source of ASP pag

by ivanheng In reply to Programatically stores so ...

I already know about the solution suggested. What I was actually asking is, is there a way I can automatically save it to a file rather than manually clicking View source and save it.

Thanks

Collapse -

Programatically stores source of ASP pag

by ramkaranr In reply to Programatically stores so ...

you can internet explorer object to access the webpage and save method to access the url and save the file

Collapse -

Programatically stores source of ASP pag

by ivanheng In reply to Programatically stores so ...

can i have more information on how to use the IE object?

Collapse -

Programatically stores source of ASP pag

by olivier_de-polignac In reply to Programatically stores so ...

You could do the following: instead of using Response.Write statements, create a text file, and use the .Write method on the file object.

Hope this helps,

Olivier.

PS: Here is a little sample code:

Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\testfile.htm", True)
MyFile.Write("This is a test.")
MyFile.Close

Collapse -

Programatically stores source of ASP pag

by ivanheng In reply to Programatically stores so ...

The question was auto-closed by TechRepublic

Collapse -

Programatically stores source of ASP pag

by expertpc In reply to Programatically stores so ...

Please close this link if it is dead. It brings down the performance capabilities of the web server and database calls. If you are still waiting for an answer.....WOW....you are patient

Collapse -

Programatically stores source of ASP pag

by ivanheng In reply to Programatically stores so ...

The question was auto-closed by TechRepublic

Collapse -

Programatically stores source of ASP pag

by ivanheng In reply to Programatically stores so ...

This question was auto closed due to inactivity

Back to Windows Forum
9 total posts (Page 1 of 1)  

Related Discussions

Operating Systems Forums