Sign in to follow this  

[web] I need ASP to generate .htm page

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a website made up of html pages. I have ASP pages that run behind the scenes and should NEVER be seen in the address bar. How can I generate a page from an ASP to a .htm extension on the resulting page. As an example I was x.asp to generate y.htm, yet y.htm should not exist on my web server. Thanks...

Share this post


Link to post
Share on other sites
Quote:
I have ASP pages that run behind the scenes and should NEVER be seen in the address bar.

Why, exactly?
You can generate HTML files in ASP and save them to disk rather than streaming them to the browser... but most ASP files (apart from routines that you include) are just .HTM files with a funny extension, as far as the browser goes.
If you really want to hide the text in the address bar, try wrapping your site inside a frameset with a single page, like this site. (browse it and see how the address bar doesn't change!)

Share this post


Link to post
Share on other sites
I can't see any other way of achieving this other than forcing IIS to serve up HTML pages through the ASP processor. When the HTTP GET request is parsed by IIS, it chooses the type of server model based on the file extension passed to it. If you open your IIS properties you can see which parser is used to serve your page and change it appropriately. Of course, you can only do this with sufficient access to your host's server.

Other than the frameset method suggested by Ben, the only other way I can imagine is using some client side scripting to perform some extra request and insert the content from the ASP page to the HTML page, but this is ugly and a blatant hack.

I'm baffled as to why you'd want to hide the ASP extension?

Share this post


Link to post
Share on other sites
If you ABSOLUTELY have to have the extension ".htm" show up in your address bar, then the only way I can think of around this situation is to configure your web-server to process html files as asp. If you are running your own web server, this should be possible. However, If your page is hosted somewhere else, this may be impossible.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alex
If you ABSOLUTELY have to have the extension ".htm" show up in your address bar, then the only way I can think of around this situation is to configure your web-server to process html files as asp. If you are running your own web server, this should be possible. However, If your page is hosted somewhere else, this may be impossible.


Does this mean that if I change the program behind the extension that it would run the asp parser instead of the html parser? I did not think of that. That might truely work.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alex
If you ABSOLUTELY have to have the extension ".htm" show up in your address bar, then the only way I can think of around this situation is to configure your web-server to process html files as asp. If you are running your own web server, this should be possible. However, If your page is hosted somewhere else, this may be impossible.


Thank You...Thank You...Thank You...exactly what I wanted.

Share this post


Link to post
Share on other sites
You can make it be a HTML page, which uses javascript and DHTML to slurp in data that's generated by your ASP pages. Of course, bookmarks for that page wouldn't work that well. Or you can hide it all in XSLT, which you generate using ASP and reference from HTML. Or you can use an IFRAME that references the ASP.

Share this post


Link to post
Share on other sites

This topic is 4840 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this