Duration: 24 minutes
Summary: In this video, we discuss more details of the master pages. As we specified earlier master pages serve as a template for other pages so you can have a standard look and feel across all pages. One of the items that we need to talk about today is the use of asp.net image versus a regular html image, and how that gets interpreted within the master pages. We will add an image to the Images folder, and then add one reference in the master page and another in the content page.
Finally, how about changing the master page dynamically? We can load a different master page depending on a specific criterion. Since the merger between the master page and the content page happens early in the page life cycle, we need to make our modifications in the PreInit method. We can give the user a selection to choose the master page he/she likes best. Or we can pass a key in the query string. Either way, it is easy to change the master page dynamically.
Methodology of the development of example: Good coding standard and simplified design to illustrate the key points.
Technology Used: ASP.NET and Visual Studio 2010Keyword: ASP.NET 4, Visual Studio 2010, master page, PreInit, method, dynamic