Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MVC4を使用してビューを返すコントローラーがありますが、この特定のビューでは、配置したマスターレイアウトを使用したくありません。これを達成することは可能ですか?
置く
@{ Layout = null; }
ビューファイルの上部にあります。他のレイアウトファイルへのパスを指定することもできます。
また、特定のアクションのreturnステートメントを次のように変更することもできます。
return PartialView();
そのため、アクションの結果をレイアウトファイルでラップしようとはしません