Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I'm doing routing in my project. But what the problem is all pages are loading twice or thrice.

C#
public static void RegisterRoutes(RouteCollection routes)
        {
           routes.RouteExistingFiles = false;
            routes.Add(new Route(@"*\.jpg", new StopRoutingHandler()));
            routes.Add(new Route(@"*\.png", new StopRoutingHandler()));
           



          

            // Register a route for Book detail Page Book/id/roomid
            routes.MapPageRoute(
                    "Booking detail Page",      // Route name
                    "Book/{id}/{roomid}",      // Route URL
                    "~/BookDetails.aspx"   // Web page to handle route
            );   

              routes.MapPageRoute(
                   "Bid Detail by Id",      // Route name
                   "BidDetail",      // Route URL
                   "~/BidDetails.aspx"   // Web page to handle route
               );

            // Register a route for Default Page
              routes.MapPageRoute(
                      "Main booking",      // Route name
                      "Booking",      // Route URL
                      "~/Default.aspx"   // Web page to handle route
                  );

   

       

        }



Any help will be appreciated


Regards
Chinnu
Posted
Comments
S@53K^S 4-Oct-12 9:05am    
did you check the call stack for the second and third time? probably the browser is submitting a request and the javascript/some other control is submitting a request.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900