i want to controller to search for a view in more than two folder (by default controler search in Shared and second folder with its own name ) can we make controller to search in any third folder including above two also.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Custom View Engine
Write a custom view engine and provide all your paths that you want. Then register it in global.asax codebehind in
Application_Startevent handler.Check this question on SO that will give you all the information you need:
Can I specify a custom location to "search for views" in ASP.NET MVC?