【发布时间】:2016-03-25 04:32:50
【问题描述】:
- 我在 ASP.NET MVC razor 中的布局有问题
- 我有3个_Layout,一个页面是“Product.cshtml”,还有一个参数 "somethingPara"
- 我想用参数“somethingPara”的值,页面将使用 一些_布局。
- 但我不知道如何实现。
- 有人可以帮助我。
- 非常感谢。
【问题讨论】:
-
到目前为止你实现了什么?
-
我不明白你的问题?现在我只能有一个_Layout,但我想要我的页面,将使用其他模板每个“somethingPara”的值 例如:if (somethingPara == 1){ _LayougePage = "_Layout1" }else if (somethingPara == 2){ _LayougePage = "_Layout2" }
-
请编辑问题以添加您迄今为止的工作。 cmets 中的代码无法阅读。
标签: asp.net asp.net-mvc asp.net-mvc-4 razor