I have an web application, developed on web form architecture. It has a very easy structure which has only one aspx file (default.aspx) and all other contents are being retrieved inside user controls. I am loading user controls in default page based on query string. For example if url is default.aspx?mod=books, I am loading bookUser.ascx user control to display all book records. If url is \[code\]default.aspx?mod=pages&id=5\[/code\], that means one page record with ID 5 is loaded.Basically I tried to clean url and rewriting all URL with query string with new routing feature in .Net 4.0.
I defined two map routes in global.asax file. The weird thing inside default.aspx file is Page.RouteData.Values returns project directory name as ID parameter value. \[code\]RouteTable.Routes.MapPageRoute("Pages", "{lang}/{mod}/{name}/{id}", "~/default.aspx");RouteTable.Routes.MapPageRoute("Modul", "{lang}/{mod}/{name}", "~/default.aspx");\[/code\]I did not understand why it is putting one of my project directory name to \[code\]Page.RouteData.Values\[/code\].I could not post related images because of lack of reputation
I defined two map routes in global.asax file. The weird thing inside default.aspx file is Page.RouteData.Values returns project directory name as ID parameter value. \[code\]RouteTable.Routes.MapPageRoute("Pages", "{lang}/{mod}/{name}/{id}", "~/default.aspx");RouteTable.Routes.MapPageRoute("Modul", "{lang}/{mod}/{name}", "~/default.aspx");\[/code\]I did not understand why it is putting one of my project directory name to \[code\]Page.RouteData.Values\[/code\].I could not post related images because of lack of reputation