Interview answers verified by specialists.
Find interview questions and answers on this website:
Master pages in ASP.NET works as a template that you can reference this page in all other content pages. Master pages enable you to define the look and feel of all the pages in your site in a single location. If you have done changes in master page, then the changes will reflect in all the web pages that reference master pages. When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page. ContentPlaceHolder control is available only on master page. You can use more than one ContentPlaceHolder control in master page. To create regions that content pages can fill in, you need to define ContentPlaceHolder controls in master page as follows: <asp:ContentPlaceHolder ID=''ContentPlaceHolder1'' runat=''server''> </asp:ContentPlaceHolder> The page-specific content is then put inside a Content control that points to the relevant ContentPlaceHolder: <asp:Content ID=''Content1'' ContentPlaceHolderID=''ContentPlaceHolder1'' Runat=''Server''> </asp:Content> Note that theContentPlaceHolderIDattribute of the Content control points to the ContentPlaceHolder that is defined in the master page. The master page is identified by a special @ Master directive that replaces the @ Page directive that is used for ordinary .aspx pages. <%@ Master Language="C#" AutoEventWireup="true" CodeFile="CareerRide.master.cs" Inherits="CareerRide" %>