Hi,
I just created a ASP.NET MVC project in VS2008.
When I press F5 to debug the current view in my browser, it open the URL of the ASPX file :
http://localhost/Views/MyController/Index.aspx
instead of :
How to make it open the good URL ?
Hi,
I just created a ASP.NET MVC project in VS2008.
When I press F5 to debug the current view in my browser, it open the URL of the ASPX file :
http://localhost/Views/MyController/Index.aspx
instead of :
How to make it open the good URL ?
You've got start action set to Current Page in the Web tab of the project properties.
Change it to Specific Page and leave the specific page text box blank.
Edit: from the comments attached to this answer we've established that what would be desirable is for VS to heursitically determine that given that the current page in the editor is "Views/Products/Index.aspx" we would like VS to start a debugging session at /Products.
This is too much to be asking of VS right now.
The alternative might seem to always be starting from the root and navigating in.
However you can edit the Specific Page text box to the path you'd like it to start. If you are debugging the above view then entering "Products" in the text box would probably be the closest you'd get to the goal.
You'd have to keep changing the content of the Specific Page text box each time you want to repeatedly test a different view.