Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When i try to access .aspx page and try to navigate from cshtml to aspx page. It throws me

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.



How to overcome this



Thanks in advance
Posted
Comments
Pooja Dhanani 26-Sep-13 9:20am    
You are trying to navigate from cshtml to aspx page, via link?
rajeshkool 26-Sep-13 9:41am    
Hi Pooja,
I need only aspx page . I want to set the .aspx page in view as start page. when i try to load the .aspx page it throws error 404 resource was not found.
Pooja Dhanani 26-Sep-13 9:46am    
From RouteConfig file, whatever the First Controller-Action get called(your start up page), make sure that, that ActionMethod view [View Engine] is created as ASPX (c#), not Razor(CSHTML)
rajeshkool 26-Sep-13 9:50am    
can you please provide me a sample code for routeconfig file.
rajeshkool 26-Sep-13 9:52am    
I used this code in Global.asax file Pooja
RouteCollection rr = new RouteCollection();
rr.MapPageRoute("AdminPage", "", "~/AdminviewNew.aspx");

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