AspDotNetAtoms.com provides daily updates on ASP.NET Tutorials, Programming Resources, .NET Articles, Authors and more.

Categories

Recent Posts

Friendly URLs with URL mappings : Marco Bellinaso

Thursday, September 25 2008

This sample extract from the Wrox's book "ASP.NET 2.0 Website Programming" shows how to set-up the new url-mapping feature built-into the ASP.NET 2.0 framework. You no longer need to manually code a custom HttpModule! The more meaningful and short a URL can be, the better. Those URLs are easier to communicate to people, and easier for them to remember. The current URLs that allow us to browse articles for a specific category are already pretty short, but it’s not easy to remember all category IDs by heart . . . and thus to remember the URL. ASP.NET 2.0 introduces a new section in web.config that allows us to map a virtual URL to a real URL: This section’s name is urlMapping, and it’s located under . When the user types the virtual URL, the page located at the corresponding real URL will be loaded. Here’s what you can write in web.config to make your sample categories easier to reach...

Read More:
Friendly URLs with URL mappings : Marco Bellinaso
Also See:
How to Popup a Window Using DIV Layer in ASP.NET 1.x/2.x : Bilal Haidar
Reporting Made Easy : Steve C. Orr
Nested Master Pages : Richard Bean
Animated Popup Master/Detail using GridView, DetailsView and JQuery with jqModal & UpdatePanel : Muhammad Mosa

Post your comment

Comment