You have two options.
1) Use return PartialView() on the controller, it will not accept the layout from the View window
2) Assign layout = null,
@{ Layout = null; }
End this interesting discussion and answer marcind around this topic.
ssilas777
source share