11 August 2011

ASP.NET MVC - Return views from any view folder

Normally in ASP.NET MVC you return a view like this:
return View("Edit");
This view will be found in either:
  • Views/Category/Edit,
  • or Views/Shared/Edit.
You can however also return a view from another location,
like this:
return View("~\\Views\\Administration\\CategoryEdit.cshtml");

No comments:

Post a Comment