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.
精彩评论