Author: jtran96 | Posted on: 3/14/2010 11:02:40 PM | Views : 418

I have a WebForm website that loads content pages in the form of a web user control (.ascx) using the querystring.
Sample url:
http://mysite.com/?page=/members/default or http://mysite.com/default.aspx?page=/members/default
The content files would be located at ~/contents/members/default.ascx.
 
Would it be possible and how to use the URL Routing to accomplish http://mysite.com/page/members/default and more folders down.
 
I have tried putting in the Global.ascx file:
void Application_Start(object sender, EventArgs e) { System.Web.Routing.RouteTable.Routes.MapPageRoute("contents", "page/{page}", "~/default.aspx"); }
In the def ...

Go to the complete details ...