RadControls for ASP.NET AJAX
URL Routing with ASP.NET 4.0 has never been easier. While it was first a luxury of ASP.NET MVC,
WebForms applications got routing support with .NET 3.5 SP1. With version 4.0 of the framework, setting
up URL routing is now a piece of cake. For those of you who have never heard of it: URL Routing enables
your application to use URLs that do not directly map to physical files, but can instead represent a
user-friendlier, more descriptive, logical structure. It is not URL rewriting and not URL mapping, where
these effectively restore the original physical URL of the page down the request pipe.
As of Q2 2010 version of Telerik RadControls for ASP.NET AJAX, RadDataPager SEO paging now
supports URL Routing. Setting it up is all a matter of giving values to a couple of properties in the RadDataPager:
Effectively, RadDataPager requires that you indicate routing is used for your application (by setting
AllowRouting). It then needs to know:
The name of the route that leads to the target .aspx page containing the datapager - specified
in RadDataPager by the RouteName property.
The name of the URL parameter that specifies the current page index - specified in RadDataPager by
the RoutePageIndexParameterName property.
In the following example a route is defined in Global.asax file that leads to DataPagerRouting.aspx.
The route defines a single URL parameter with a default value of 1. This parameter will be used to specify
the current page index in RadDataPager. To take advantage of this route setup the RadDataPager is configured
to use this route. The route name and the name of the URL parameter that specifies the page index are set.
For more details about ASP.NET Routing, please check the following links: