asp.net mvc 3 - MVC 3 Layout and Controllers -


The application I am creating a MVC 3 application should be able to display a different layout according to the sub domain (eg. : Customer1.mysite.com -> layout1; customer 2.mysite.com -> layout2; etc ...) will also have a layout for mobile and IE6

I have seen that their _ViewStart.cshtml is that I can take advantage of logic to set the layout. But where is the controller for what I did not get? Should I write all code in the view?

Another question with layout how do you implement code for normal behavior? Do you have a controller for it?

And finally I have seen the concept of areas in ASP.NET MVC 2, it is obsolete now that we have a razor?

Thank you for your help

FRED

I can write in _ViewStart that I think will be written in a better way, which includes a different layout based on user agent or domain. After that you will have general controls and views, only the layout will be different.

Comments