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.

Related posts:

  1. ASP.NET 4.0 and Visual Studio 2010 Web Development Beta 2 Overview
  2. Visual Studio 2010 and .NET Framework 4.0
  3. VB and C# enhancements in VS 2010

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

Read previous post:
Free download Visual Web Developer book!

Here are four free chapters from the book "The Microsoft Expression Web Developer's Guide to ASP.NET 3.5: Learn to create...

Close