I'm a very beginner(Learner) in MVC. Is this question is stupid, sorry for that. I'm having three controllers
Added view for this controller and its having three sub folder views
Is it possible to put all view into one sub folder like this
Is this stupid? Is this bad approach?
ASP.NET MVC already have such all in one folder - Views/Shared
If you put your view there and call Controller
, that don't have View
in it's own folder you get the View
from Shared
.
Also, you can try to change View location by creating Custom View Engine but it's not so easy. You can find how to do it here .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.