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.
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 13, 2013, 12:21 AM EDT
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.
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Jun 12, 2013, 9:55 PM EDT
suppose you have Index view then define action result in XYZController
like
public ActionResult Index()
{
return View();
}
Ashutosh Chaturvedi93 reputationPosted Jun 12, 2013, 11:03 PM EDT
Ashutosh Chaturvedi93 reputationPosted Sep 10, 2013, 9:23 AM EDT