Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:

Recycle Bin | MMS | ManagedVsCrawledProperties |

Monday, October 15, 2012

SharePoint Interview Questions and Answers: MasterPage

  1. What is master page and use of it?
  2. Types of master pages in SharePoint?
  3. Is any improvements in SharePoint 2010 masterpage when compared to SharePoint 2007?
  4. Difference between master pages and SharePoint master pages?
  5. How to set our custom master page as default master page programmatically?
  6. How to configure user controls(.ascx) in master pages?
  7. How to add webparts to the master pages?
  8. Can I use .Net master pages into SharePoint directly?
  9. How to configure the images, css, style sheets in master pages?
  10. What is delegate control and use of it in SharePoint master pages?
  11. What are all types of delegate controls in master pages?
  12. What all are contentplaceholders in master pages?
  13. I have developed one custom master page and I want to set my custom master page as default master for every newly site collections, site, web etc.?
  14. Difference between SharePoint foundation master pages and SharePoint server master pages?
  15. How to set the custom master as default master to the site in both SharePoint foundation 2010 and SharePoint server2010?
  16. How to set the same masterpage to the child sites in both SharePoint foundation 2010 and SharePoint server2010?
  17. How to hide the “Home” tab(means first node on topNavBar) in master page 2010?
  18. Difference between deploying masterpage using farm solution and sandbox solution?
  19. Can we deploy published site master page into SharePoint foundation sites?
  20. Masterpage and page layouts options missing in the left navigation in SharePoint designer2010?
  21. Event receivers with custom application pages in SharePoint 2010?
  22. What’s the difference between MasterPageFile and DynamicMasterPageFile?
  23. What is the difference between deploying custom master pages either using sandbox and farm solution?   

Masterpage provides layouts for set of pages. Master Pages are a template that other pages can inherit from to keep consistent functionality. The pages that inherit from Master Pages are referred to as content pages.

In SharePoint, when we add a new page from browser by going to Site Actions and select Create Page then there we will select the page layout and create the page. So we are selecting the page layout, it’s always binds to a master page. Whenever you change the default or custom master page, then the changes will be applied to all the page layouts by default. Because SharePoint won’t give direct master page URL or name anywhere. It will be ~masterurl/custom.master for custom master page and ~masterurl/default.master for the default master page.

Only one gallery exists per site collection and it is automatically populated when a new site collection is provisioned. Master pages cannot be shared across site collections, but a root site can share its master pages with the other sites in its site collection.
Note: Master Page directive at the top of the page: <%@Master language=”C#”%>

Content pages are the ASP.NET pages that implement a Master Page. Content pages are normal ASP.NET pages that contain an attribute which informs the compiler that the page should be merged with a Master Page. This attribute is part of the page directive tag and is called the MasterPageFile

What all are content placeholders in master pages?
Master page in SharePoint contains Content PlaceHolders. Content placeholders are areas of replaceable content on the master page. The tag is <asp:ContentPlaceHolder>. A master page may define many ContentPlaceHolder controls; a page does not have to implement a corresponding content control. There are contentplaceholders like PlaceHolderMain, which displays the main body of the page. PlaceHolderLeftNavBar, which contains the Quick Launch bar on the left side of the page, PlaceHolderTopNavBar, which contains the Top Navigation tabs at the top of the page, and PlaceHolderSearchArea, which contains the page’s search controls.

Total count: 33
Visual reference to above mentioned Content Place Holders are
How to properly hide Content Placeholders in your SharePoint Masterpage?
Move the place holders which are not to show in asp panel and set the attribute visible to false.

SharePoint master pages have their own list/library called the Master Page Gallery .To access a SharePoint master page gallery goes to a SharePoint site collectionà site settings à master page gallery.

There are 3 main types of Master Pages in SharePoint
  • Site Master Pages
  • System Master Pages
  • Application Master Pages
Site Master Pages are usually used in SharePoint publishing site definitions. These pages are used for the main .This is needed for publishing pages because the main page, of a site or sub site, usually has the publishing feature turned.
Site master pages are defined by ~masterurl/custom.master in the content page declaration.
System master pages are used for most non-publishing sites and subpages (list or library) in publishing sites.
System master pages are defined by ~masterurl/default.master in the content page declaration.
Application master pages are for all “Layout” pages. Layout pages are SharePoint administrative pages.