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

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid
Post New Web Links

Allow/prevent specific default web parts from being added to pages

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :SharePoint
In SharePoint 2010 is there a way to allow/prevent which default web parts be used? I have Designers who need the ability to create pages and libraries, but I don't want them to be able to add all types of web parts to a page.


View Complete Post

More Related Resource Links

how to change default menu tab in master pages?



i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?


Default "area" in master pages

Is there a way to specify a default area for any content specified in a master page?  I have a global master page and a bunch of user controls (.ascx) with action links defined without regard for 'areas' - is there a way to specify the default area to use when rendering action links and the like? The problem occurs when navigating to an area; all the unspecified master page links do not link back to the default area (in my case the root). I.e., Html.ActionLink("Home", "Index", "Home") renders as "/area/home/index" rather than "/home/index". I'd like this to work for all the links defined in the master page file without needing to specify Html.ActionLink("Home", "Index", "Home"new { area = "" } Thanks in advance, Mike

Error: Access Denied on default.aspx and other pages of existing and new sites

Hi, since today we can't access the project portals of all our projects (Visual Studio TFS 2008/sharepoint admin 3.0 running on esx 4.0). I already checked every possible security settings, they're all OK. I also tried creating a new site but I can't access the site. I can however access all the settings. For example when I try to access: http://server/Sites/Profel I get the "Error: Access Denied" message and the browser is redirected to http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2Fdefault%2Easpx I have no problem navigating to: http://server/sites/Profel/_layouts/settings.aspx and I can go to al lot of pages, but when I want to create something like a calendar I can specify the parameters but when I click the create button I get the same error. http://server/Sites/Profel/_layouts/AccessDenied.aspx?Source=http%3A%2F%2Fserver%2FSites%2FProfel%2FLists%2Ftest%2Fcalendar%2Easpx&Type=list&name=%7B46CB3B46%2DD0F6%2D47F5%2DBA1A%2D3C9654A24A8E%7D I already tried this: http://support.microsoft.com/kb/926642  http://support.microsoft.com/kb/896861/en-us but no success Any help is welcome, Greetz, Peter

Contact Details web parts on pages won't show any more than 7 pictures



For each new person that is added to a company department, we add a contact details webpart and their picture to the departmental page. We can't seem to add any more than that, the contact details webpart and their name shows up, but no picture. The other 7 pictures do continue to show up. Is there a limitation on the contact details webpart?

Using Office Web Parts by Default ?



I have a SP2010 list with a context menu where I have a few custom pages.  Works like a charm.  I recently installed Office Web Parts and enabled the Word & Excel pieces.  When I go to the Document Library in my site, I click on a Word or Excel doc and it comes up in the Office Web Part.  No problems so far.

One of my context menu items is 'Document Matrix', where it displays a bunch of Hyperlinks to various documents within my Document Repository.  These links are unfortunately simply opening Word & Excel instead of launching the Office Web Apps to display them. 

My question is, when using a Hyperlink, how do I get SP to 'default' to using Office Web Apps instead of launching Word or Excel separately?



Provision/Add custom Layout, Master and Default pages in Site Template


I'm attempting to use the onet.xml of a custom Site Template to provision/add (same thing?) a custom Master Page, a Custom Layout page and then reference them in Configurations.

I'm having trouble understanding the steps and order to do this in properly and am getting errors where the Layouts/Master pages cannot be found.  Here is what I have now:

<Module Name="SitesLayout" Url="_catalogs/masterpage" Path="Layouts" RootWebOnly="false">

  <File Url="SitesLayout.aspx" Type="GhostableInLibrary"><Property Name="Title" Value="AEP Sites Layout Template" /></File>


<Module Name="AEPMasterPage" Url="_catalogs/masterpage" RootWebOnly="false">

     <File Url="CustomMaster.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="true" />


<Module Name="DefaultFunctional" Url="Pages" Path="">

     <File Name="MyDefault.aspx" Url="DefaultOrgFuncHomePage\default.aspx" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE">

     <Property Name="Title" Val

Initial Redirection to .../Pages/default.aspx?


How/where does SharePoint 2007 / IIS 2008 control the redirection of a site base url to .../Pages/default.aspx?

I have a SP site that for some reason is displaying the directory browsing of its ...\inetpub\wwwroot\wss\VirtualDirectories directory instead of initalizing SharePoint.

I did find a missing HTTP Header which should have been inherited and manually entered it but that didn't help.



Marking Specific Pages with a Flag



I have a website that has many pages.  Half of the pages need to redirect a user to a specific page.  The other half DO NOT need to redirect a user.

How can I mark a page as needing / not needing redirection without going into each Page_Load and manually writing my code.

I was thinking about creating a MasterPage and creating a virtual property called NeedsRedirection and overriding it in the webpages, but I soon realized that the webpages still do not INHERIT from the master page.

Any other suggestions as how to mark a page as needing redirection?  Can I do this in the markup to make it easy?

Thank you.



Prevent browser caching of web pages in asp.net which works in all browsers (IE/Firefox..)

The article Prevent browser caching of web pages in asp.net which works in all browsers (IE/Firefox..) was added by grizz on Thursday, October 28, 2010.

In this articleI am going to explain how to prevent the browser caching of web pages in asp.net. It is the one of the biggest issues every developer willface.Why browser caching? To speed up the user experience on the web, most browsers implement a technology

prevent browser specific url encoding


hello everyone,

postBackEventReference = this.Page.ClientScript.GetPostBackEventReference(postBackOptions, true);

has a different result depending on the agent which made the request.
I need to overwrite this behaviour in a server control and return exactly the same code for IE/FF/Chrome/...

My custom server control inherits from LinkButton. I'm overriding

protected override void AddAttributesToRender(HtmlTextWriter writer)

For example I'm adding a custom postback url. This url contains "<" in its markup which of course needs to be escaped to %3c.
The GetPostBackEventReference(..) method returns %3c if the request was made with FF/Chrome and so on and %253c if the Request was made with MSIE.
I'm having serious trouble getting %3c encoded urls to work in FF/Chrome and so on. So I went on and replaced escaped all '%' to '%25' one more time.

Unfortunately modifying the result of the GetPostBackEventReference(...) method has little effect. As soon as

writer.AddAttribute(HtmlTextWriterAttribute.Href, postBackEventReference);

is called, my postBackEventReference string is stripped of all the extra %25 encodings I put into the F

Document set with default documents that use quick parts

Is it possible to have default documents that use quick parts?   If so how?  If not, how do I populate document properties when the set is created?

How to add wiki pages into the menu(PlaceHolderLeftNavBar) when newly added to the wiki library?



When adding new wiki pages i would like that they are automatically added to the PlaceHolderLeftNavBar (left menu).
How can i perform this option?

Thanks in advance

Set as default master page in Sharepoint Designer 2010 does not change pages at all


I make a copy of V4.masterpage ,rename it as myv4.masterpage, and modify it .

then right-click myv4.masterpage and choose 'set as default masterpage'.

but when i open my site, the pages don't change, and create a new page,it still the old look.


Shouldn't it do that?

Moving Web Part Pages with Content Editor Web Parts


In our MOSS 2007 application, we were moving a document library from one site to another (on the same site collection).  In the library, there were several web part pages (.aspx) that contained Content Editor Web Parts.

The pages were copied (using Manage Content and Structure) and they contained the Content Editor Web Parts.After the move, but all of the Content Editor Web Parts were blank.  I thought that the content was saved on the page but it looks like I was mistaken.

Is there a way to move these Web Part Pages while preserving the Content Editor Web Parts?


Displaying SharePoint lists in Web Parts

When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Six easy ways to customize your site using Web Parts in SharePoint

Becoming familiar with Web Part customization techniques gives you a range of page-customization choices. For example, you can customize your site's home page so that it displays the specific information that your team needs. You can rearrange the list items on the home page, add lists, and even change the images on the home page. As you become more familiar with Web Part Page customization techniques, you can build interactive Web Part Pages that makes the data in lists more dynamic and useful, and you can add new Web Parts that provide access to external data and Web services.

SharePoint Tutorial - Web Parts

A page in SharePoint is comprised of web parts the exist within zones. Web parts are available for just about everything. For example in the page below there are four web part highlighted by different colors. The purple web part displays a short list of the new announcements stored in the annoucements library. The pink web part displays events from a calendar within the site. The green web part displays an image from a location the user specifies. The gray web part displays a list of links from the links list on the site.
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