I successfully completed this lesson: http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx
All views are displayed successfully when accessing the page using a mobile device. But they are displayed in the wrong location (AKA main page).
I have the following structure: / Views / Shared / Mobile / _Layout.cshtml / Views / Shared / _Layout.cshtml
The problem is that in the view of EVERYONE I have to put the following statement:
Layout = "~/Views/Shared/Mobile/_Layout.cshtml";
Is there a place where I can put my logic to display one layout on another?
if (normalAccess) returns normal _Layout.cshtml else (mobileAccess) render / Mobile / _Layout.cshtml
I could not find where.
Thanks for any help.
source
share