by Jane Thomson
30. November 2010 19:04
As we all know, with the release of ASP.net 2.0, it has become quite easy to create uniform layout across almost all the pages on a website. Let us look at some brief of the ASP.net master pages here in this article.
In order to create uniform pages across the website, a user needs to create only one master page which can characterize the look, feel and typical behavior of all the pages across the website. After that, individual content pages can be created with the given look and feel with required content on the page. Thus, while user requests for the content page, ASP.net merges it with the master page to create a combine page of defined layout and content.
Just like master pages, there exists a feature called dynamic web template. However, it is advised to use master pages while using the ASP.net to give a consistent look across the website with the share content pages. And if a user is working with the HTML files, it is advisable to use the dynamic web templates.
Benefits of Using Master Pages
Let us now look at the benefits of using the master pages in the ASP.net files which can convince a user to use the master pages in website. Traditionally, it was defined to copy all the code from one page to another page in order to create uniform pages across the website but master page has overtaken this duty to make it quite simple for a user. The benefits include:
- Master page allows unifying the common functionality required in all the pages so user only has to update a single page.
- Master page allows to create only single set of controls which can be applied to the pages across the website.
- With this, it also provides such a model object through which user can modify the master page through the individual content page.