I need chang from aspx extension to html.
for example:
i have a one page (news.aspx)
i want to show this page in browser news.html
news.aspx ----> news.html
only change extension
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
AlanRank #669 · 3.6K reputationPosted Jul 11, 2007, 1:07 PM EDT
http://msdn2.microsoft.com/en-us/library/system.io.path.changeextension.aspx
sayeh zendeh3 reputationPosted Jul 13, 2007, 10:38 PM EDT
i want show a aspx to html.
just in browser(IE,Firefox)
john ginzo16 reputationPosted Jul 17, 2007, 9:12 AM EDT
Normally this is accomplished in one of two ways. First, you can use url rewriting within your application to rewrite the path to your aspx page. That way, when the user type the html url, your application intercepts that and serves the aspx page instead. Here is an article on that:
http://www.stardeveloper.com/articles/display.html?article=2004022801&page=1
remember to go to IIS and re-map the html extension to the .NET dll so that html files get handled by your application.
Second, you could write your rewrite code in an ISAPI filter, that gets called by IIS before .NET does. The advantage of this is you can change the extension of the request here, and your .NET code doesn't have to do anything, just handle the request. Here is an example of that....
http://www.codeproject.com/isapi/isapiredirector.asp
I have to let you know, there are quirks and issues with both implementations, so test well.
John Ginzo
GinzoTech Solutions
http://www.GinzoTech.com