meco

ASP.NET asx FIX

Apr 5th, 2011
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. /* ASP.NET Route HACK/FIX
  2. Created by: Hamzalija Meco
  3. Place this code in "Global.asx"
  4. ABOUT: this will fix the asx bug there is in asp.net for each time we use url redirect in our pages.
  5. */
  6.  
  7.     void RegisterRoutes(System.Web.Routing.RouteCollection routes)
  8.     {
  9.         routes.Add(new System.Web.Routing.Route("(resource).asx/(*pathinfo)", new System.Web.Routing.StopRoutingHandler()));
  10.     }
  11.  
  12.     void Application_Start(object sender, EventArgs e)
  13.     {
  14.         // Code that runs on application startup
  15.         RegisterRoutes(System.Web.Routing.RouteTable.Routes);
  16.  
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment