Sunday, February 21, 2010

URL Routing in ASP.NET 4.0

In ASP.NET MVC you can have clean nice SEO friendly Url.
For example:
- http://mySite.com.au/Category/List
- http://mySite.com.au/Product/Detail

However with ASP.NET 3.5 SP1, Webforms require an implementation of an IRouteHandler to support clean nice Url.
This can be quite tedious, and often require more work.

However with ASP.NET 4.0, you can add this support easily without having to use or implement an IRouteHandler.

The below two articles explain how to achieve this in web forms.

http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx

http://www.4guysfromrolla.com/articles/012710-1.aspx

Happy Programming!

No comments:

Post a Comment