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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
john ginzoPosted Jul 17, 2007, 1:12 PM
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
sayeh zendehPosted Jul 14, 2007, 2:38 AM
i want show a aspx to html.
just in browser(IE,Firefox)
AlanPosted Jul 11, 2007, 5:07 PM
http://msdn2.microsoft.com/en-us/library/system.io.path.changeextension.aspx