Web parts are ASP.NET controls that can be added to web part zones. They are generally distributed as WSP files. Pre-2013, they could be developed off the hosting server. With 2013, WebParts for the most part have to be developed the hosting server for propery library inclusion.

learn more… | top users | synonyms (3)

17
votes
5answers
1k views

Organizing WebParts in Visual Studio - Best Practices

My team is responsible for maintaining a SharePoint 2010 site that was developed by another group. This maintenance includes updates to existing web parts (approximately 20). Currently, all of these ...
16
votes
4answers
10k views

SharePoint 2010 Application Pages. vs. Web Parts

I have done many a search on this issue with mixed results and ensuing ambiguity. The time has come to nail it down for good. If I'm developing the equivalent of a complex ASP.NET application, and I ...
13
votes
2answers
5k views

Which Redirect method should I use?

I'm using SharePoint 2010. I have webparts, then when OK/Save/Cancel etc is clicked, it will redirect a user to the relevant page. Over the past few months of writing different WebParts I have ...
12
votes
3answers
21k views

Hide the “Add new Item” option below the sharepoint 2010 list

I have a sharepoint 2010 list, I want to hide the option "add new item" which resides below the list, any suggestions?
12
votes
6answers
1k views

Performance problem with custom web part

We've implemented a custom web part which we use to render content of an external website into a SharePoint page. During our test we encountered some strange performance issues. When we open a ...
12
votes
3answers
6k views

How do I find in which (sub)sites a WebPart/Feature is used?

I need to find out on which (sub)sites a certain webpart is used. In a data sharing environment with many subsites and pages, I want to check if and where certain (third party) webparts are used. Is ...
10
votes
3answers
2k views

Google Maps v3 on Web Part page

Has anybody been able to implement Google Maps v3 on a Web Part page (SharePoint 2010)? The maps render fine if I display them in a separate .aspx page, but as soon as I try to embed the code in a ...
10
votes
1answer
2k views

Implement Interface in custom “Connected Web Part” to provide “Filter Values”

Question 1.1 What interface do I need to implement into my custom web part, to make it a provider for "filter values" for a normal XsltListViewWebPart? Answer - IWebPartParameters "XSLT List ...
9
votes
9answers
4k views

ASP.Net WebPart or SharePoint WebPart

This is an almost religious question; what are your preferred base classes for building WebParts in SharePoint? Are you using the ASP.NET WebPart (System.Web.dll) or the SharePoint WebPart ...
9
votes
4answers
1k views

Why does having `windows.onload` break page editing?

This is related to an earlier question that I posted: Can't edit page after adding custom web part! Basically, I have created a web part with some javascript. When I add this web part to a ...
9
votes
6answers
2k views

Why would a site admin or designer use a Web Part Page instead of a new sub-site/sub-site collection?

I am a site owner, and up until now, I have always created sub-sites instead of using basic pages or Web Part pages. I would like to understand what advantages Web Part Pages have over just adding a ...
9
votes
4answers
5k views

Replace the Default Page in a SharePoint WebSite

I have been asked to programmatically do the following in a SharePoint 2007 team site collection: Create a website using the OOTB blank site template. (Please note, for project specific reasons, we ...
9
votes
5answers
2k views

How do I deploy the new version of a webpart?

As stated here (and as i checked), to upload a new version of an installed webpart, uninstalling the assembly from the GAC and installing the new version would suffice. I've tried it and it worked. ...
9
votes
4answers
2k views

How to save variables per user session per page

I am using three webparts. Webpart A creates a value when the user clicks on the button in Webpart A. WebPart B uses this value to create a list with items the user can select. WebPart C uses both ...
9
votes
3answers
2k views

How to localize webpart title, description, group, quickadd group in Sandbox solution

I've seen other similar questions (like this one), checked Microsoft documentation (like all the ones stemming from and related to the page Localization of Sandboxed Solutions in SharePoint 2010), ...
8
votes
4answers
2k views

How to add list web part to the SharePoint page using Managed Client Object Model?

I am trying to add new web part to the SharePoint page using Managed Client Object Model that will display a list. I can't seem to be able to figure out the code of the web part's XML that is ...
7
votes
1answer
1k views

Why is my CAML query working in CAML Builder but not in the application?

I have a CAML query that queries a calendar list and I want it to return all the items in the list with an EventDate of today or later, ordered in ascending order. The CAML query I'm using is this: ...
7
votes
3answers
2k views

How to prevent a SharePoint web part from being crawled

We have a custom web part for our SharePoint 2007 farm that calls a very large report (lots of views and stored procs being called) that is used on hundreds of pages on team sites and MySites. We get ...
7
votes
1answer
648 views

Where to load data in the lifecycle of custom webpart

I have a webpart where I access a sharepoint list and render contents of that list. At the moment I'm fetching the data in CreateChildControls(). When a button is clicked the data will be fetched ...
7
votes
1answer
519 views

Is it possible to hide a webpart from webpart gallery programmatically?

Is it possible to hide it? I'm developing a webpart for a special page and it shouldn't be possible to place it somewhere else.
7
votes
1answer
714 views

When to use VS 2010 vs. SP Designer for development

When do we use Visual Studio 2010 for SharePoint 2010 web part development and when do we stick with Designer? Are there pros/cons? As a noob, it seems that for more robust, customized web parts, ...
6
votes
4answers
1k views

Can I get the source for the out-of-the-box web parts in SharePoint 2010?

I'd like to take an existing web part and add some functionality. Can this be done? I figured out how to download the dwp for the webpart but this does not appear to have any source code in it. ...
6
votes
2answers
354 views

Weekly update from the boss

I am a site owner for a military unit (we are going heavily to SharePoint.) We have SharePoint 2007 installed, and have no flexibility to add more web parts. We also have limited ability to ...
6
votes
3answers
3k views

WebPart where to store a connection string

I have a webpart that connects to an external DB. I need somewhere to store the connection string. It is possible for this data source to change but would always be the same for the site collection ...
6
votes
6answers
4k views

How to programmatically create a chart in SharePoint?

I need to create a chart based on items from a list dynamically in a webpart...
6
votes
2answers
7k views

Adding ScriptLink for js file to my Visual Webpart causes error: “Cannot make a cache safe URL for…”

Full error: Cannot make a cache safe URL for "sprocketcomplete/layouts/sprocketcomplete/js/sprocketcomplete.js", file not found. Please verify that the file exists under the layouts ...
6
votes
1answer
2k views

Problem installing web part using Powershell

We've developed a custom Visual Web Part using Visual Studio 2010 for Sharepoint 2010 Server. The webpart gets deployed when executed from VS (F5), so we can add it wherever we want using Sharepoint ...
6
votes
4answers
5k views

Sandboxed web part failing with “No available sandboxed code execution server could be found”

I'm deploying a web part as a component of a sandboxed solution from Visual Studio 2010 to Windows 7 SharePoint Foundation Server 2010 on my development box, and I receive the following error when ...
6
votes
2answers
1k views

Webparts on Application Pages (_layouts)

Is it possible to have web parts on application pages. In other words having a web parts page in the _layouts catalog? Have tried inheriting from webpartpage, no errors but nothing happens when ...
6
votes
2answers
445 views

Anonymous access: Add an Item to List without allowing to View the List

I'm creating a 'Contact Us' webpart with form to allow anonymous user to send a message which will be added to a SharePoint List. However I cannot grant the anonymous user the permission to Add ...
6
votes
1answer
596 views

Get and remove all currently displayed notifications from SP.UI.Notify

I am sending a variety of notifications via SP.UI.Notify.addNotification("blah", true); setting the "sticky bit" to true so that the notification stays visible. When I display a second ...
6
votes
1answer
690 views

How to get WebPart on current page by name/ID with javascript?

I have a page with some webparts on it, I want to get specific one (by name or ID) using client javascript. I try this code var ctx=SP.ClientContext.get_current(); var web = ctx.get_web(); var site ...
6
votes
1answer
377 views

Multicast playing of video inside SharePoint

If I use the Flow Player (http://flowplayer.org/) to play videos (which is stored on a network storage) using the Content Editor Web Part in SharePoint 2007, will the videos operate in a multicast way ...
6
votes
1answer
792 views

Exception on connecting webparts

I have a couple of webparts on a page, XsltListViewWebPart and SPSlicerTextWebPart instances. I need to programmatically connect the filter (slicer) to the xslt webpart. When I do so, I need a ...
5
votes
5answers
3k views

How to validate Web Part property value?

A custom web part has custom web part properties. I would like to validate with custom server side code when user changes property value (or when properties are bing saved). Is that possible? Can I ...
5
votes
2answers
4k views

Is it possible to add web parts to an application page?

I was asked to add a list view web part to an application page. I added a web part zone into the page markup. I got a security error when I tried to add it so I added a form digest control (not sure ...
5
votes
4answers
1k views

Catch exception in web part, or let it bubble up?

I'm writing a web part for other sites to use in their SharePoint installation. In the logic of the web part I throw exceptions at certain failure points. I'm wondering whether it is a better ...
5
votes
7answers
4k views

What is the proper way to add jQuery to a MasterPage?

Currently I am using this method in the header: <script src="/_layouts/MNCAssets/scripts/jquery-1.5.1.min.js"></script> But for some reason, my webparts that use jQuery don't appear to ...
5
votes
3answers
125 views

SharePoint Admin and Developer Roles [closed]

Currently in our organization we have a three man SharePoint development team where we do everything other than SharePoint admin. Our organization has development, test, and production servers. We, ...
5
votes
3answers
1k views

.Webs and anonymous access?

We're developing a public facing SharePoint site so it have anonymous access. To be able to run custom web parts that access lists/libraries we need to run with elevated privileges which works fine, ...
5
votes
3answers
5k views

Is there a list of Sharepoint 2007 WebParts, Features and ContentTypes that Sharepoint installs with?

Does anyone know where I can find a list of all the WebParts, Features and ContentTypes that are available to a regular Sharepoint installation? What I need to do is identify any of the above in a ...
5
votes
2answers
6k views

How to have two web parts side by side in same zone

I have two web parts that i want to fit side by side in the same zone, however, I'm not sure how to go about this. I've modified the width of the individual web parts to be able to fit side by side ...
5
votes
2answers
375 views

Location of web parts in use

After running preupgrade check, I found a few instances of some web parts I'd like to further investigate. These are 3rd party web parts that I'd like to know where they are actually being used. For ...
5
votes
2answers
4k views

Picture Slideshow Web Part image size too small

I have a picture library of four images. Each of these is quite large. When the Picture Slideshow Web Part is configured it shows the pictures at about 50% of their actual size. Is there a way to ...
5
votes
2answers
8k views

How do I change the background color of a web part?

I've got a document library embedded on the home page of one of my SharePoint sites. Someone changed the background color to grey, overriding the site's theme background color, which is white. I've ...
5
votes
1answer
186 views

Bulk Sharepoint Webpart Modification

Is there a way to go in and edit a set of webparts in bulk, instead of one by one? We've got a site with roughly 75 pages with an average of 3 webparts per page. Each of those webparts have a section ...
5
votes
2answers
254 views

How do I handle custom webpart property type update during re-deployment

I have a custom webpart that was defined with a property like [Personalizable(PersonalizationScope.Shared), WebBrowsable(true), WebDisplayName("Chart Type"), Category("Chart - Required")] ...
5
votes
2answers
589 views

How to remove web parts from an unghosted page layout

Background: So I've apparently committed the cardinal sin in SharePoint. I edited a page layout in SharePoint Designer! This of course injected the special SPD meta attributes into the layout which ...
5
votes
5answers
4k views

Refreshing custom developed web part

I've developed a custom web part that pulls data from a list. It will only retrieve items where a field called ShowItem is equal to 'Yes'. Once the data is loaded the end user has the ability to ...
5
votes
3answers
439 views

Possible to security trim what web parts a user can put on a page?

Basically when you select Insert -> Web Part you get this menu: Is it possible to determine what is available here based on a users role?