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 を使用した Web プロジェクトで 2 つの異なるマスター ページまたはレイアウトを使用するにはどうすればよいですか?
2 つの異なるレイアウトを作成し、ビュー内で使用するレイアウトを選択できます。
@{ Layout = "~/Views/Shared/MyLayout.cshtml"; }
これは、ビューをレンダリングするコントローラー アクション内でも実行できます。
return View("Index", "MyLayout", myViewModel);