URL Routing with Visual Studio 2010 and ASP.NET 4

Some of the new features also include making SEO-friendly url’s. Before we used to write some keywords mapping but now it all could be done with code.
Before:
http://ajaxus.net/news.php?newsID=23232

Now:
http://ajaxus.net/news/Url_routing

This can be achieved with the function MapPageRoute.

Handling PostBack Scenarios

URL Routing with ASP.NET 4.0 fully supports postback scenarios. The

control will automatically emit the same URL that caused the page to be rendered. For example, if you access a page with a /products/software URL then any server-side

control within it would render out a

HTML element back to the client – which means that any postback scenarios that happen on the page will preserve the original URL.

Here is ScottGu’s blog post.


Leave a Reply

Your email address will not be published. Required fields are marked *