Master Pages - ASP.NET (MCQ) questions and answers

Here, you can read Master Pages multiple choice questions and answers with explanation.

1)   Choose the correct option about Master Page and Theme.
- Published on 28 Jul 15

a. A Master Page enables you to share content across multiple pages in a website and A Theme enables you to control the appearance of the content.
b. Theme enables you to share content across multiple pages in a website and A Master Page enables you to control the appearance of the content.
c. App_Themes folder contains skin files.
d. Option A and C are correct.
Answer  Explanation 

ANSWER: Option A and C are correct.

Explanation:
No explanation is available for this question!


2)   Which of the following statements about referencing master page methods and properties is true?
- Published on 28 Jul 15

a. Content pages can reference controls in the master page.
b. Content pages can reference public properties in the master page.
c. Content pages can reference public methods in the master page.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


3)   What is/are true about master page?
- Published on 28 Jul 15

a. Master page contains a <%@ Master %> directive instead of the normal <%@ Page %> directive.
b. ContentPlaceHolder control can be added only on master page.
c. You can add as many ContentPlaceHolders to a Master Page as you need.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


4)   What is/are true about master page? Choose the correct option.
- Published on 28 Jul 15

a. You can add more than one master page in a website.
b. Master page can be nested.
c. ContentPlaceHolder control is required on a content page.
d. Both A and B options are correct.
Answer  Explanation 

ANSWER: Both A and B options are correct.

Explanation:
No explanation is available for this question!


5)   What are the basic steps to reference master page properties from a content page?

- Published on 27 Jul 15

a.
- Create a property in the master page code-behind file.
- Reference the master page property from the content page using the syntax Master.<Property_Name>
b.
- Create a property in the master page code-behind file.
- Add the @ MasterType declaration to the .aspx content page.
- Reference the master page property from the content page using the syntax Master.<Property_Name>
c.
- Create a property in the master page code-behind file.
- Reference the master page property from the content page using the syntax Master.<Property_Name>
d. None of the above
Answer  Explanation 

ANSWER:
- Create a property in the master page code-behind file.
- Add the @ MasterType declaration to the .aspx content page.
- Reference the master page property from the content page using the syntax Master.<Property_Name>

Explanation:
No explanation is available for this question!


6)   Which of the following is a valid skin code inside a skin file?
- Published on 27 Jul 15

a. <asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” Runat=”Server”/>
b. <asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />
c. <asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” />
d. None of the above.
Answer  Explanation 

ANSWER: <asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />

Explanation:
No explanation is available for this question!


7)   At which level Theme can be applied?
- Published on 27 Jul 15

a. Page level
b. Site level (through the Web.config file)
c. Individual control level
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


8)   Which control is required inside a content page to reference ContentPlaceHolder control inside the master page?
- Published on 27 Jul 15

a. Content control on a content page.
b. ContentPlaceHolder on a content page.
c. PlaceHolder control is required on content page.
d. None of the above.
Answer  Explanation 

ANSWER: Content control on a content page.

Explanation:
No explanation is available for this question!


9)   What is/are the advantages of master page?
- Published on 24 Jul 15

a. It helps to display common content in multiple pages.
b. They allow you to centralize the common functionality of your pages so that you can make updates in just one place.
c. It helps to create a common page layout.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


10)   Which control is required of every AJAX page to manage the JavaScript files sent to the client and the communication between client and server?
- Published on 16 Jun 15

a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Answer  Explanation 

ANSWER: ScriptManager

Explanation:
ScriptManager control is mandatory control if you want to work with ASP.NET AJAX server control. Only one instance of a ScriptManager can be added to the web page. It manages the JavaScript files sent to the client and the communication between the server and the client. It also manages partial-page updates. The HTML for a ScriptManager control in Source view looks as follows:

< asp:UpdatePanel ID="UpdatePanel1" runat="server">


1 2