Thursday 28 February 2013

ASP.NET Routing - How to fix error The resource cannot be found.


The resource cannot be found.

 Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

 

watch this example online:


In global.aspx replace the following code
            routes.MapPageRoute(
                "ThirdRoute",
                "Third",
                "~/Third.aspx/{Name}
"
            );

 with:
            routes.MapPageRoute(
                "ThirdRoute",
                "Third/{Name}",
                "~/Third.aspx"

            );


No comments:

Post a Comment