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)

19
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 ...
17
votes
4answers
12k 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 ...
16
votes
4answers
29k 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?
16
votes
2answers
8k 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
6answers
2k 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
8k 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
9answers
6k 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 ...
10
votes
4answers
5k 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 ...
10
votes
3answers
3k 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
3k 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 ...
10
votes
0answers
495 views

Client Web Part - XsltListViewWebPart

I'm trying to display a list view inside a client web part (for SharePoint hosted App). The below code will work inside an app page but does not render in a client web part. There are no errors ...
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
3k 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
7k 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
6answers
3k 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
3answers
3k 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
5answers
14k views

How to programmatically add a webpart to a page?

I have created a webpart, now I need to add that webpart programmatically into the EditForm.aspx page. Can anyone help me on this.
8
votes
2answers
13k 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 ...
8
votes
3answers
3k 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 ...
8
votes
1answer
1k 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 ...
7
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. ...
7
votes
6answers
6k 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...
7
votes
3answers
4k 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 ...
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
3k 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
946 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
648 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
845 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, ...
7
votes
2answers
8k 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 ...
7
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 ...
7
votes
2answers
10k views

Setting height to 100% in Page Viewer Webpart

I want to insert another web page inside a SP2010 page. With "Page Viewer Webpart", it only takes a small portion of the vertical space available on my SP page. I had the same problem in SP2007, and ...
7
votes
2answers
931 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
2answers
435 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
2answers
12k views

Difference between WebPart & Visual Web Part

I'm not sure how Visual Web Part is different from the actual Web Part in SharePoint 2010. Thanks!
6
votes
3answers
5k views

After retracting webpart solution webparts still showing up

I retract a webpart solution that was deployed via Visual Studio. Then when i edit a page for some reason the Custom category + the webparts are still being listed when i try to insert a webpart. ...
6
votes
2answers
6k 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 ...
6
votes
2answers
13k views

ExecuteOrDelayUntilScriptLoaded not executing after page publish

In SharePoint 2013 I have a page that is using the Script Editor web part. In the script editor web part I have the following: ExecuteOrDelayUntilScriptLoaded(startIt, "sp.js"); function startIt() { ...
6
votes
7answers
6k 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 ...
6
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 ...
6
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, ...
6
votes
2answers
489 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 ...
6
votes
2answers
7k 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 ...
6
votes
4answers
6k 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
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
2answers
13k 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 ...
6
votes
5answers
5k 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 ...
6
votes
1answer
844 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
3answers
509 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?
6
votes
4answers
8k views

Is there a web part to display all subsites with description?

I am looking for a way (via web part?) to display all sub-sites of a site collection with output similar to output you see under "Sites & Workspaces" (under All Site Content)... I know there is a ...
6
votes
3answers
1k views

How do I find out what's wrong with my sandboxed solution in SharePoint Online?

I have created a custom web part which presents a form to create a SharePoint site below the current site, while performing some ancillary actions like updating a list of subsites on the front page to ...