标签: asp.net asp.net-mvc asp.net-mvc-4 razor
答案 0 :(得分:0)
这样您就可以使用不同的布局。
@{ if(ViewBag.somethingPara =1) { Layout = "~/Administration/Views/Shared/_AdminPopupLayout.cshtml"; } else { Layout = "~/Administration/Views/Shared/_AdminLayout.cshtml"; } }