Tuesday, 15 July 2014

asp.net - What's preferred for this - master page or page inheritance? -


To see an entity, one needs to create a page in order to edit one unit in my system between the pages The difference is the menu bar and some other controls.

I currently have two options:

  1. Create a master page with some content placeholders and fill them
  2. Create a base page for that and Receive from him.

Which options do you recommend?

The master page allows you to get both code and markup.

A base page (in fact the base class, that page) only allows you to get the code; Any affiliate markup has to be injected, which is good to avoid trying to do some partial category with a page, which is never a concrete view from an architectural perspective with a markup, even if you It can work.

Since your pages start sharing markup, the page will be a better answer.

BTW, do not forget that you can nest master pages, so if you have many requirements on your site, then you have them layers. If necessary, you can use methods and properties in the master page from child pages.


No comments:

Post a Comment