开发者

Can some things in the Site.Master display conditionally (MVC)?

I am loo开发者_开发问答king into using a side bar menu option. This will only be displayed on some aspx pages. Can I insert in the site master, with a toggle condition, or do I go the tedious route of adding menu.ascx on each aspx page? I know how to add individually, but can I go the simpler Site.Master route?


You can nest master pages.

First, create the MasterMaster without the menu. Second, create SubMaster that has the menu. For the pages that have the menu, use SubMaster, otherwise use MasterMaster.

I believe that will save you time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜