Display View Inside a folder.
I am Using MVC in .NET trying to display a view which is kept inside a folder named as XYZ but not getting idea how to do it.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jun 13, 2013, 4:21 AM
hi,
As per my Knowledge MVC does not support user define folder hierarchical.
when you call View() method first it will look Area>> view >> controller folder under View Folder, then it look Area >> View >> shared folder then it look in project >> View >> shared folder.
systen will threw error if view is not found in above three folder.
hope this will help.
Ashutosh ChaturvediPosted Sep 10, 2013, 1:23 PM
Ashutosh ChaturvediPosted Jun 13, 2013, 3:03 AM
Sandeep Singh ShekhawatPosted Jun 13, 2013, 1:55 AM
suppose you have Index view then define action result in XYZController
like
public ActionResult Index()
{
return View();
}