I am working on a web based application ,I am going to rewrite the url of the pages using Global.asax file .
I have successfully done all the pages but I could not able to do the first page of the application which is initiate while loading the application .
I have used below codes in global.asax file :
protected void Application_Start(object sender, EventArgs e) { SetRouting(System.Web.Routing.RouteTable.Routes); } private void SetRouting(System.Web.Routing.RouteCollection routeCollection) { routeCollection.MapPageRoute("log", "Login", "~/log.aspx"); routeCollection.MapPageRoute("Controlpannel", "Master", "~/Controlpannel.aspx"); //routeCollection.MapPageRoute("QueryStringPage", "QueryString/{Id}", "~/QueryString.aspx", true, new RouteValueDictionary(new { Id = "0" })); }and using below code while page loading :
protected void Page_Load(object sender, EventArgs e) { Response.Redirect(GetRouteUrl("log", null)); }Please guide me what code should i need to write below page load ,My rest of pages are working fine with same code .
Regards L
Laxman SharmaPosted Jul 6, 2016, 4:51 AM
Laxman SharmaPosted Jul 6, 2016, 4:26 AM
Vinay SinghPosted Jul 6, 2016, 3:21 AM
Laxman SharmaPosted Jul 6, 2016, 2:24 AM
kalu singh raoPosted Jul 6, 2016, 2:17 AM
Laxman SharmaPosted Jul 6, 2016, 1:08 AM