Reputation:
currently i am working on asp.net mvc where by mistake i have right clicked my cshtml file and set it as start page now whenever i run the page it runs with path according to the directory and not in controller way for example i have set views/home/simple.cshtml as start page now i press CTRL + F5 then it runs in browser as views/home/simple.cshtml rather than Home/simple way of controller
how to reset this set as start page in visual studio
Upvotes: 9
Views: 14028
Reputation: 2093
Open the property of project tab "Web" then select "Specific Page" then click in "SVG Image Maps.".
Don't use the path suggested by visual studio ex: "Views/Account/Login.cshtml
".
Use the controller/Action ex: "Account/Login
".
Or
in "Web" select "CurrentPage".
Upvotes: 5
Reputation: 8471
Open up the properties of the project, and click on the web tab. Select the Specific Page radio button. Simply type in the url you want to use!
Or, create a new MVC project and review the properties to see how it is set up as default!
Upvotes: 13