Last post Oct 08, 2020 11:21 PM by johnboyman12
Oct 08, 2020 11:21 PM|johnboyman12|LINK
Hello. I have built a whole mvc5 asp website and am now making a mobile version using bootstrap classes to identify when the screen is an xs for mobile screen. I have a _layout.cshtml and many other pages in my home controller. I have RenderBody() in my
main _Layout.cshtml page I switch the view to the different .cshtml pages in the home folder. The problem is that The RenderBody() code doesn't go with my mobile app. Because the mobile version of the app has a different layout than the normal version the
part of the code with RenderBody() I have to just have to hide it when a mobile phone loads the site. I do not want to display pages with RenderBody for my mobile site because the layout it so different I just want to be able to navigate to cshtml pages like
a .html page. I do not want _Layout's html to load aswell. Currently if I navigate to a .cshtml page in my msvisual by right clicking on it and going to view in browser that page and the _Layouts code loads along with it. I just want to see that pages code
only without loading all of the _Layout.cshtml code along with it. How can I acheive this? Thanks. I would like to be able to do it just for debugging and also by clicking an href link. Thanks for any help.
Problem is solved. The solution was to redesign my _Layout.cshtml to work with my mobile design.