Be that as it may, is there an easy way to set MasterView as the default for all actions inside a particular controller?
For example, if I have a HomeController , I want all the actions inside it to inherit Site.Master by default, but if I'm inside the AccountsController I want all the actions to inherit Admin.Master , etc.
I managed to do this with
return View("viewName", "masterName", objectModel);
But in doing this, I have to apply it every time I call the View method.
I was looking for something simpler, like on rails, where we can state:
class HomeController < ApplicationController
layout 'site'
def index
end
def create
...
end
class AccountsController < ApplicationController
layout 'admin'
def index
end
def create
...
end
Is it possible?
Thank you in advance