3
In my project, I am developing so that the application works even if the user is with Javascript disabled or unavailable. If Javascript is not available, I load the page normally. If available, I upload some of these pages into a modal
so that the flow becomes more fluid.
To control the look of these pages, each view inherits the default layout of my application through the file _viewstart.cshtml
. What I would like is that when the page is loaded via ajax, this layout is not used, which is equivalent to this:
@{
Layout = null;
}
How can I achieve this (preferably without relying on extra variables, either in the URL or via @ViewBag
)?
It seemed the best approach, given that I use my layout in a
_viewstart
! Thank you. I used the third approach in a blockif
simple.– Tiago César Oliveira