.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 >> SharePoint >> Post New Question Subscribe to Interview Questions

How-to add web part to master-page?

Posted By :volvo     Posted Date :December 11, 2013    Points :40   Category :SharePoint 
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.

You can also find related Interview Question to How-to add web part to master-page?  below: 

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

What are the differences between web part page gallery, site gallery,Virtual server gallery and online gallery in SharePoint?

  
Web Part Page Gallery in SharePoint is the default gallery provided by Microsoft that comes installed with SharePoint. Site Gallery is specific to one sharepoint website site. Virtual Server gallery is specific to that virtual server and online gallery is available for download web parts from MSDN. (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...)

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

  
Yes We can add more than one master page to our web application (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...)

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

What are the differences between web part page gallery, site gallery,Virtual server galleryand online gallery?

  
Web Part Page Gallery is the default gallery that comes installed with SharePoint. Site Gallery is specific to one site. Virtual Server gallery is specific to that virtual server and online gallery are downloadable web parts from Microsoft. (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...)

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

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

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

You added a SharePoint Web part to page, and now, when you go to the page, get an error message. To get the page working again, what need to do?

  
Go to the page with the error and add

?Contents=1

to the end of the page's URL. If the URL already has a "?" then add this instead to the end of the URL:

&Contents=1

You will now see a list of all of the Web Parts on the page and can now delete the offending Web Part.

Here is an example for a site URL that ends in aspx:
http://.../default.aspx?Contents=1 (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...)

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