开发者

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

开发者 https://www.devze.com 2022-12-16 11:39 出处:网络
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 a

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

精彩评论

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

关注公众号