I have a controller that returns the view using MVC4 however for this specific view I don't want it to use the master layout I have in place. Is this possible to achieve?
put
@{
Layout = null;
}
on the top of your view file. You can also provide path to any other layout file.
you can also change your return statement in given action to
return PartialView();
so it will not attempt to wrap result of your action with layout file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With