tags:

views:

163

answers:

4

I'd like to know how it is possible to have the URLs of the pages of a Web Forms based web application without the ".aspx" extension.

For instace, "http://stackoverflow.com/questions/ask" instead of "http://stackoverflow.com/questions/ask.aspx"

Many thanks!

+3  A: 

This can be done by using either ASP.NET MVC or the routing engine by itself.

Jose Basilio
+10  A: 

The technology that stackoverflow uses has been discussed many many times, what you are looking for is the ASP.Net MVC Framework

http://www.asp.net/mvc

http://stackoverflow.com/questions/tagged/asp.net-mvc

This can also be done using URL rewriters

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Tom Anderson
I'd upvote, but MVC has nothing to do with the question. :(
Chad Grant
+1  A: 

This is generally done using a routing engine in a framework. However if you want to do this for an arbitrary application it's really done using Apache's Mod_Rewrite.

rnavarro
+2  A: 

You want Asp.Net Routing. Best place to start is here: http://haacked.com/Tags/Routing/default.aspx

If you are using IIS7 it is easy. IIS6 requires a little more work.

Chris Brandsma