Web parts are are the building blocks of Microsoft SharePoint web pages.
Questions tagged [web-parts]
1693 questions
28
votes
7 answers
Add ScriptManager to Page Programmatically?
I am developing a WebPart (it will be used in a SharePoint environment, although it does not use the Object Model) that I want to expose AJAX functionality in. Because of the nature of the environment, Adding the Script Manager directly to the page…

Kyle Trauberman
- 25,414
- 13
- 85
- 121
21
votes
8 answers
How to check if a word starts with a given character?
I have a list of a Sharepoint items: each item has a title, a description and a type.
I successfully retrieved it, I called it result. I want to first check if there is any item in result which starts with A then B then C, etc. I will have to do the…

sara
- 215
- 1
- 2
- 8
14
votes
6 answers
How to find the logged in user in Sharepoint?
I have developed a "web part" that has to be deployed on a Sharepoint server. I need the username of the user, who has logged in the sharepoint server within the web part.
How do I get that username?

Brigadier Jigar
- 1,191
- 3
- 10
- 20
13
votes
6 answers
How do I tell if an SPListItem is a document or a folder
I have a loop that is looping through a document library like in the example below.
foreach (SPListItem item in DocumentLibrary)
{
}
How do I tell if the SPListItem is a document or a folder?

Joe
- 531
- 2
- 7
- 16
13
votes
3 answers
Sharepoint custom web part property does not show up in the toolbox
I have defined a boolean property as follows:
[Browsable(true), Category("Display"), DefaultValue(false),
WebPartStorage(Storage.Shared), FriendlyName("Obey Workflow"),
Description("")]
public bool ObeyWorkflow { get; set; }
I'm expecting it…

kjv
- 11,047
- 34
- 101
- 140
13
votes
3 answers
Override Chrome Type Webpart
I made a Webpart in Sharepoint 2010, and I need that the property "Chrome Type" allways set a "None" value.
I was looking for ways to force the Combobox to "None", or overriding the "Chrome Type" in the C# class, but I didn't find any way to do…

Dr. No
- 1,306
- 5
- 28
- 57
13
votes
2 answers
How to open URL in SSRS report in webpart to new window
I have created a report that I will embed in Sharepoint 2007 via a webpart using a report viewer. This works well and looks rather nice, however in the report I have a text field whose action is "Go To URL".
When I click on the link within the…

Kixoka
- 989
- 4
- 15
- 37
13
votes
3 answers
Add user control to web part in Sharepoint 2013
I've got a visual web part (created with standart Visual Stuido 2012 template from "Add new item" form) with just a single element. I want to programmatically add my own user control to it using the…

4tuneTeller
- 500
- 1
- 7
- 12
12
votes
1 answer
Datetime comparison in CAML Query for Sharepoint
i'm trying to have some item from a sharepoint list, depends on date in a custom column.
I've created my query with U2U Caml Builder, and that's worked but when I put it in my own code in my webpart, it always return to me all the items od the…

Garcia Julien
- 756
- 2
- 7
- 20
12
votes
3 answers
jQuery $(document).ready() not firing
Using jQuery 1.4.2 from Google hosted Code.
Is there a reason why the following javascript does not fire all 3 document.ready functions when the document is ready?
The first $(document).ready() function, which renders headers, and the second, which…

Darbio
- 11,286
- 12
- 60
- 100
11
votes
2 answers
Change the Category for Web Part to be displayed
In Sharepoint 2010, is there any way to change the category where custom web parts created in VS2010 to be placed.
VS2010 is putting the custom web part in "Custom" category by default. I'm curious that, is there any way for us to change it, for…

Beytan Kurt
- 2,203
- 4
- 34
- 57
11
votes
5 answers
Possible to load a web part inside another?
So, this is what we want to do: We want to have a generic web part with a custom frame around it and then dynamically load other web parts (frameless) inside it. Would this at all be possible you think? A bit like Jan Tielens SmartPart, only not for…

noocyte
- 2,484
- 5
- 29
- 44
11
votes
2 answers
Sharepoint: Web Part vs. ASP.NET User Control
When creating web parts for Sharepoint, is it better to create an actual web part, or is using and ASP.NET User Control (.ascx) just as good?
I already know how to create the user controls that I need, so it seems like the extra effort of creating a…

Ryan Smith
- 8,344
- 22
- 76
- 103
11
votes
10 answers
Sharepoint web part: type could not be found/registered as safe
I have a SharePoint web part (essentially just a "Hello World" app) that I just created and am having a problem deploying it. I have signed the .dll, created the .dwp, and registered it as a safe control in web.config. I am able to add it to the Web…

Geo Ego
- 1,315
- 7
- 27
- 53
11
votes
11 answers
SharePoint error: "Cannot import Web Part"
I have a web part that I've developed, and if I manually install the web part it is fine.
However when I have packaged the web part following the instructions on this web site as a…
anonymous