ASP.NET master page - control if menu html is shown or not -


i'm creating asp.net site pages need have div floated left site menu in , other pages don't have menu div , instead content takes entire page width.

i'm planning use master pages - wondering how best achieve - few immediate thoughts spring mind:

  • create 2 master pages, 1 menu , 1 without. when creating content pages choose master inherit from. straightforward, may require more rework if site design changes
  • create single master page content placeholder menu. on each page include menu div if needed (seems more messy approach)
  • nested master pages?

it seems may common problem, interested in how addressed. note questioning need having pages without menu - simpler if pages had same structure.

nested master pages standard answer , should work well.

an alternative approach occurs me put menu in panel control on master page , expose property lets toggle visibility of panel. have not tried yet, not sure how practical is, might fun concept play with. if works way expect gives single master page can reconfigured content page.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -