How to route a querystring to a Web forms page

Profalamr

New Member
I have a .NET 4.0 Web Application. I have configured it for routing by using System.Web.Routing, so it's sort of a MVC / Web Forms hybrid. I'm trying to map this url to a route:http://www.contoso.com/qr/?p=10In my global.asax I have tried:\[code\]routes.MapPageRoute("QR", "qr/{*id}", "~/WebShop/Qr/Default.aspx");routes.MapPageRoute("QR", "qr/default.aspx", "~/WebShop/Qr/Default.aspx");routes.MapPageRoute("QR", "qr", "~/WebShop/Qr/Default.aspx");\[/code\]But none works. I have other routes that work just fine like:\[code\]routes.MapPageRoute("Meals1", "Meals.aspx", "~/Meals/Meals.aspx");\[/code\]Can anyone help.Cheers
 
Back
Top