Reputation: 77
I'm developing an application using MVC 5. I have added a new area which contains a view called Register and gradually adding content to it. For debugging purposes, I'm trying to access that area directly through url after logging in to application. I'm using the url: http://localhost:port/Area/Account/Manage/Register
But I'm getting error. How will be the url, If need to view Register page directly. Please find the directory structure below:
Upvotes: 0
Views: 125
Reputation: 218842
You cannot access the view file directly. You should access it via an action method.
Create an action method called Register
in your ManageController
(if not exists) and return the view
public ActionResult Register()
{
return View();
}
now you can access this by navigating to yoursitename/account/manage/register
assuming you haven't altered the default route registration for the area.
Upvotes: 1