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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Programaticaly set the Page layouts and site settings

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :SharePoint


I have created custom site definition,

After  creating subsite with this site template.

In this subsite --> Create Site --> This custom site definion should not appear

I set it Subwebonly="False"  in respective  xml file


How to programaticaly  set           -------->the  site actions -->Site Setting --> look and  feel -->Page layout and site settings



<Configuration ID="1"

View Complete Post

More Related Resource Links

Site Settings - Page Layouts and Templates Error


I'm getting an error page when trying to reach Page Layouts and Templates page from site settings on one of the sites in our collection.  When the user clicks on Site Settings -> Modify all site settings -> Page Layouts and Site Templates an error page is displayed with the message: Data at the root level is invalid. Line 1, position 1.  I've checked Event Viewer on the server and found no errors for this issue.  I'm very new to SharePoint Admin and I'm not sure why this would happen.  I'm including an exerpt from the log file below.  Does anyone have any ideas for me? 

10/30/2009 13:50:01.42 	w3wp.exe (0x0BC4)                       	0x07C8	Windows SharePoint Services   	General                       	8e25	Medium  	Failed to look up string with key "ReportBuilderContentTypeDesc", keyfile .	 
10/30/2009 13:50:01.42 	w3wp.exe (0x0BC4)                       	0x07C8	Windows SharePoint Services   	General                       	8l3c	Medium  	Localized resource for token 'ReportBuilderContentTypeDesc' could not be found for file with path: "(unavailable)".	 
10/30/2009 13:50:01.43 	w3wp.exe (0x0BC4)                       	0x07C8	Windows SharePoint Services   	General                       	72kg	High    	#20015: Cannot open "Resources.en-US.resx": no such file or folder.	 
10/30/2009 13:50:01.43 	w3wp.exe (0

Apply custom.master to "Site Settings" page?


I'm using a custom.master page, which is applied to almost all pages available to READ users.

However, I'd like to apply it to the Search, Site Settings, and View All Site Content pages.

I'm not sure where this would be applied.

Guidance much appreciated. Thanks!

Programmatically Hide Master Pages from Site Master Page Settings page?



I know there is a field you can check when you edit the properties of a Master Page in the Master Page Gallery to set a Master Page to hidden but ... can anyone think of a way to programmatically hide specific Master Pages from the Site Master Page Settings page?

Maybe this should be two questions:

  1. How do I programmatically access a Master Page in a Master Page Gallery?
  2. Is there a property that can be set that will hide the page from the Site Master Page Settings page?

How do I change the top menu navigation for layouts like Site Settings?

I used something similiar to what Kalik posted on this thread, however, I'm not seeing the same results in layouts like Site Settings.  Any answers would be appreciated. Thank you, Mike ADD TO TOP LINE! <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> ADD IN HEADER AREA! <PublishingNavigation:PortalSiteMapDataSource ID="siteMapDataSource1" runat="server" SiteMapProvider="CombinedNavSiteMapProvider" EnableViewState="true" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="false" TreatStartingNodeAsCurrent="true" TrimNonCurrentTypes="Heading"/> </HEAD> REPLACE STANDARD TOP NAV CODE! <!--- Modified Top Nav ---->    <SharePoint:aspmenu    ID="GlobalNav"    Runat="server"    DataSourceID="siteMapDataSource1"    Orientation="Horizontal"     MaximumDynamicDisplayLevels="1"     StaticPopoutImageUrl="/_layouts/images/menudark.gif"    StaticSubMenuIndent="0px"  &nb

I am a Site Administrator, but I do not see Site Settings or Edit Page menu from Site Actions

Hi, I have been using MOSS for over 2 years, but I have not even heard or seen this kind of situation. I am a Site Administrator, but I do not see Site Settings or Edit Page menu from Site Actions menu, and I typed in http://mysitecollection:portnumber/_layouts/settings.aspx to go to setting page manually and looked around there. I confirmed that I am the site administrator, but when I go to Advanced Permissions, I do not see any checkbox beside each users. So basically, I am a Site Administrator on the site, but I am really NOT! What is going on here!? 

programatically add link in site settings page through feature


Hi folks,

          Im newbie in SharePoint, we have created an Application  Page for Managing the WebPart Permissions. We need to add one link called "ManageWebParts"  in the site settings Page so that  the admin can go the site settings and  Navigate to the ManageWebpart.aspx Page using this link. How we can  add the link  through programatically using feature???


Your thoughts??



Thanks & regards


Master Page getting applied to site settings page


I want to apply masterpage to my Home.aspx and not on site settings page.

When I apply my custom master page it gets reflected on the site settings page as well, which I dont want.

Please help.


Anshul M

Associating Page Layouts with newly created site



I've a simple web part in which i'm creating a sub site within my site collection.

I'm creating this site based on publishing template. 

I've created some custom page layouts (using designer) that are already deployed on my site. 

now when i'm creating a new site based on publishing template, i want one of my page layouts to be associated with this new site.

I really don't have any idea how to do it? So need your help in this regard. 


Thanks & Regards,





Associating Page Layouts with newly created site



I've a simple web part in which i'm creating a sub site within my site collection.

I'm creating this site based on publishing template. 

I've created some custom page layouts (using designer) that are already deployed on my site. 

now when i'm creating a new site based on publishing template, i want one of my page layouts to be associated with this new site.

I really don't have any idea how to do it? So need your help in this regard. 

 P.S. I'm working in SharePoint 2010.

Thanks & Regards,


Site Settings page empty-blank, Site Actions not clickable in custom site created programmatically f



We are migrating from MOSS 2007 to SharePoint 2010 and testing custom code used for creating sites. Sites were used to be created based on a site template, 'STP' file. In 2010, there are no more 'STP' files, instead 'WSP' solution packages are used, so we created a new WSP site template in Solutions gallery. The custom code uses that WSP for creating sites now.

But, when a site is created, and when you go to Site Settings from Site Actions menu, it load empty page - no any settings links or anything, just a blank page (/_layouts/settings.aspx). Also, Site Actions menu becomes unclickable.

Has anybody seen something like this?

Thanks a lot!


Regards, R.D.M.

Changing the graphics on the home page of a SharePoint site

When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Master Pages: Master Your Site Design with Visual Inheritance and Page Templates


Master pages in ASP.NET 2.0 solve a problem many Web developers have been solving on their own with a variety of techniques for years - providing a single master template for an entire site. This article covers the details of master pages, discussing their usage and implementation and how they are a natural evolution of custom techniques developers are using today.

Fritz Onion

MSDN Magazine June 2004

Login page for whole site


Hi all,


I've been searching and trying to get this now for hours, so i though i'd come here.

For my website, there will be an admin site. I want to create users in my website database, i have a logins table with a hashed password column. The problem i have is making sure that every request if not already logged in send the user to the login page.


I have a page Login.aspx which i have created, but if i enter http://website/admin/news.aspx it bypasses the login screen and shows the page!!


Does anyone know how i can do this? i have created Login.aspx myself and verified that the username and password enetered are correct.




My site link on my home page.



One of the user got My owa link in place of my site on the my home page ( go to my site --> my home --> top right corner shows My owa insead of my site ) and he wants to edit that my owa link now. first of all i dont know how he got that My owa link in the place of my site on my home page. When he surfs any other page than he is getting my site on all other pages. so he is just getting My owa link in place of my site only on the my home page.

At the first glanse, i think it would be master page issue but if that would be the case than it shold apply all the users but this is happening just for one user and we are not using custom master page.

Please help.


Page layout list not displaying in page settings



I have 4 different custom page layouts in my publishing site at the site collection level. I have one site named "Services" in site collection. When i create page, i select one page layout from above 4. But when i go to the page settings of that page to change the page layout of it, i can see only one page layout which this page based on.

Problem is why all the page layouts not listing there? I checked "Page layout and site templates" settings from look and feel of Site Settings, this r set to "Pages in this site can use any layout".

Please help..!

Thanks in advance.


Sandip Patil

Sharepoint Developer


How to create a single entry page for site collections in MOSS 2007



I have  7 site collections containing a few hundred team collaboration sites. Some users are internal (intranet) but most are external (extranet). Extranet users are experiencing problems with losing links to their sites and forgetting which URLs to use. So I would like to create a single entry page that all users can enter after the logon process, which shows a list of sites they have permission to access, and other user-specific information. Perhaps relevant documents, tasks, recently modified documents etc.

I know this sounds like a 'My Site' but we want to use use a general welcome page instead. We use Windows authentication.
What is the best way of doing this and is it something that can be done in SharePoing Designer or does it need to be done in Visual Studio?

Many thanks in advance.

Sharepoint 2007 - Wiki site - New Pages Not Inheriting Custom Master Page


I am working on a SP site (MOSS not WSS) which is heavily customised away from the OOTB layout. I need to create a Wiki site, which was going well - I've created a master page which displays the miniconsole (this was not visible with our customised layout), and made it the default master page for the site. This has been applied to the two standard pages that come with the Wiki site, however when a new page is created, it seems to inherit the default.master, rather than my custom master page - thus not showing the miniconsole.

When I have created a new page, I am able to use SharePoint Designer to attach my custom master page to it, which works perfectly, however this will not be a viable option going forward as end-users create their new wiki pages.

How can I get the new pages to inherit my master page when they are created?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

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