Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books
Content
ASP.NET Part 1
ASP.NET Part 2
ASP.NET Part 3
ASP.NET Part 4
ASP.NET Part 5
ASP.NET Advantages
ASP.NET Issues
ASP.NET Life cycle
ASP.NET Server control
ASP.NET Server vs. HTML
ASP.NET Datalist control
ASP.NET Application & session
ASP.NET Navigation method
ASP.NET Validation control
ASP.NET State Management
ASP.NET Caching
ASP.NET Exception Handling
ASP.NET Master pages
ASP.NET Tutorial
Session state management
Authentication-Authorization
Globalization-Localization
 
ADO.NET
NET Remoting
NET Interview
C#.NET
VB.NET
AJAX
 
PHP
 
C
C++
Java
Data Structure
Oops
 
Database concepts
SQL Server
Oracle
MySQL
Data warehousing
 
Operating System
Project Management
Linux
Testing
Networking
 
UML
XML
HTML
SOAP
CSS
VBScript
 
CV tips
Cover letter tips
Interview tips
Human resources
Soft skills

Master Pages in ASP.NET


By Nishant Kumar

ASP.NET Master Pages - Interview Questions

What is Master Page in ASP.NET?
Advantages of using Master Page in ASP.NET
Define Multiple Master Page.
How do you create Master Page?

Question - What is Master Page in ASP.NET?

Answer - A Master page offers a template for one or more web forms. It defines placeholders for the content, which can be overridden by the content pages. The content pages contains only content. When users request the content page, ASP.NET merges the layout of the master page with the content of the content page and produce output.  

Question - Advantages of using Master Page in ASP.NET

Answer -  Master pages enables consistent and standardized layout to the website. 
You can make layout changes of the site in the master page instead of making change in the pages. 
It is very easy to implement.

Question - Define Multiple Master Page.

Answer - In ASP.NET, you can have multiple master pages each for a different purpose. You can provide users several layout options using Multiple Master Page. You can define Master Page at multiple places in the web application.

You can specify page-level using the @Page dierective.
You can specify using the Web.config.

Remember that the definition closest to the user wins that means page-level definition supersedes site-level definition.

 

Question - How do you create Master Page?

Answer -  Steps to create Master Page

Right-click your web project in the Solution Explorer window
Select Add New Item.
Select the Master Page item type from the Add New Item dialog.

Following is an example of Master Page and a Content Page.

<%@ Master %>
<html>
<body>
<Title>Title of the Pages</Title>

<asp:ContentPlaceHolder id="Content1" runat="server">
</asp:ContentPlaceHolder>
</body>
</html>

This is simple HTML page that serves template for other pages.
The @ Master directive at the top of the page defines that the page is Master Page.
A placeholder tag <asp:ContentPlaceHolder> is overridden by the content page to place the content.
You can have many placeholders tag each of them with different id.

Content Page Example
%@ Page MasterPageFile="master1.master" %>
<asp:Content ContentPlaceHolderId="Content1" runat="server">
<h1>ASP Interview Questions</h1>
</asp:Content>

When you request this page, ASP.NET merges layout specified in the Master Page and content of content page to produce page result.

ASP.NET Validation Control questions with answers

Define Validation Control in ASP.NET. | What are the validation types supported by ASP.NET? | Describe the steps to use Validation Control.

.Net Framework Interview Question with answers

Explain the .Net Framework. | Describe the .Net Framework Architecture. | What are the components of the .Net Framework. | Explain the role of assembly in the .Net Framework. | Describe the GAC in the .Net Framework.

 

 

Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.