.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

Can we add more than one master page to our web application?

Posted By :Mallikarjuna Chigicherla     Posted Date :August 17, 2010    Points :10   Category :ASP.Net 
Yes We can add more than one master page to our web application

You can also find related Interview Question to Can we add more than one master page to our web application?  below: 

Q. Can we use our custom master page with the application pages in SharePoint 2010 ?

  

Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.
(More...)

Q. Can we use our custom master page with the application pages in SharePoint 2010 ?

  
Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom applictaion page to inherit the site master page you must derive it from Microsoft.SharePoint.WebControls.LayoutsPageBase class.

(More...)

What is a master page ?

  
1) A master page provides a framework in which the content of each page on a web site is presented. Master pages make it easy to create pages that have a consistent look.

2) The pages that provide the content that's displayed in a master page are called content pages .

3) The content of each content page is displayed in the master page's content placeholder (More...)

How would you create a Master Detail page in sharepoint?

  
Creating a Content type inheriting from Folder Content Type for the master, and another Content type inheriting from Item and using them both on a List (More...)

How to change the default page of a Silverlight application?

  
In a simple way we can set the default page, what we have to do is to change the default page of a silverlight application, we have to set the RootVisual property inside the Application_Startup event of the App.xaml file.


private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}
(More...)

What is a nested master page? How do you create them?

  
A Nested master page is a master page associated with another master page. To create a nested master page, set the MasterPageFile attribute of the @Master directive to the name of the .master file of the base master page. (More...)

You are working on an ASP.NET application. One of the drop down list contans 1 lakh records. The page posting becomes very slow. How to overcome this? You just need the selected index of the dropdownlist on submit.

  
Use EnableVieState=false. On the dropdown change event, set a hidden field value to the selected index.

Disabling view state helps us in reducing the postback load. (More...)

How can I change master page at runtime

  
The Pre_Init event is a key event to examine if we want to change the master page file programmatically.

Example:

using System;
using System.Web.UI;

public class BasePage : Page
{
public BasePage()
{
this.PreInit += new EventHandler(BasePage_PreInit);
}

void BasePage_PreInit(object sender, EventArgs e)
{
MasterPageFile = "~/Master1.master";
}
}

We get error "The 'MasterPageFile' property can only be set in or before the 'Page_PreInit' event." If we try to change master page in any other event than Pre_Init.



(More...)

Master Page in ASP.NET?

  
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. (More...)

Which is mandatory Content Placeholders Create Custom Master Page in SharePoint?

  
The Below Content Placeholders are required for backwards Compatibility:-

? PlaceHolderTitleLeftBorder
? PlaceHolderPageImage
? PlaceHolderMiniConsole
? PlaceHolderTitleRightMargin
? PlaceHolderTitleAreaSeparator
? PlaceHolderNavSpacer
? PlaceHolderLeftNavBarBorder
? PlaceHolderBodyLeftBorder
? PlaceHolderBodyRightMargin
(More...)

How-to add web part to master-page?

  
add web part to any sharepoint page using web-interface. Open this page in SharePoint Designer, find and copy tag that corresponds to your web part and tag "Register" for namespace from the begining of page. Open masterpage for edit and paste copied tags to necessary place. (More...)

What is the difference between Site Master Page and System Master Page in SharePoint?

  
The site master page will be used by all publishing pages whereas
System Master Page is Used for all forms and view pages in this site.
(More...)

Why changes in the Master page dose not visible to all users on publishing site?

  
If the Publishing feature is activated on the SharePoint site, Changes made in master page are not visible to every users even if the changed master file is checked in. It must be approved by Site Collection Administrator.
To make all changes visible to every user,
1)We need to select "Publish a major version" option while 'checking in' the master page file (in SharePoint Designer).
2)Log in with the Site Collection Administrator on SharePoint Site navigate the 'Site Settings' page and click on 'Master Pages' under 'Web Designer Galleries'.
3)Find the master page that we have changed. In the ECB (Edit control Block) menu, click on 'Approve/Reject' option.
4)After approving the changes made in the master page will be visible to all users. (More...)

What is the difference between ViewState,Application and Session of a Page?

  
View State:

- View state is maintained in page level only.
- View state of one page is not visible in another page.
- View state information stored in client only.
- View state persist the values of particular page in the client (browser) when post back operation done.
- View state used to persist page-instance-specific data. (Read more)

Session State:

- Session state is maintained in session level.
- Session state value is available in all pages within a user session.
- Session state information stored in server.
- Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.
- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)


Usage

- If you want to access the information on different web pages, you can use SessionState
- If you want to access from the same page, then you can use Viewstate
-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend