The Web Part base class contains a set of properties that you and the users of your Web Part can use to control its appearance and behavior. For example, a Web Part's Height and Width properties can be set by your code, the user, or the Web Part definition file (.dwp) you use to import a Web Part. A ...

learn more… | top users | synonyms

4
votes
1answer
5k views

Setting default value for custom webpart property

im trying to set a DefaultValue for my custom webpart property.. namespace Beraterprofil.VisualWebPart1 { [ToolboxItemAttribute(false)] public class VisualWebPart1 : WebPart { ...
4
votes
1answer
7k views

Custom webpart properties not holding their values!

I am dynamically adding items to a CheckBoxList that configures some settings in my web part. When I set the properties and click "OK" everything on my page works as expected and displays that data ...
3
votes
2answers
487 views

Is it possible to swap out urls pointing to MySite with urls to custom pages?

We've developed a custom userprofile page for a costumer. This page is supposed to be linked to by all default sharepoint buttons and links pointing to the MySite. One example is the SharePoint ...
3
votes
1answer
266 views

Create Password Field in webpart properties

I have created a custom web-part. this web-part have a custom web-part properties. i want a Password field in this property. How can i do this ? Any help will appreciated ..
3
votes
1answer
221 views

Custom SearchPage in SearchBoxEx Control

I was pushed to replace the default search box in a site collection with a customized one. At the moment it looks like this: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> ...
3
votes
2answers
1k views

Is it possible to access the web part properties from a dialog?

In my web part I use the create_DialogOptions JS function to create a new aspx site as a dialog box. That works fine. Now I would like to have access to the custom properties from the web part. I ...
2
votes
1answer
611 views

Easy way to add a custom web part property to a web part?

I'm creating a web part using Visual Studio 2008 for SharePoint 2007. If I'm creating the web part from scratch, I typically don't have any properties defined yet in my code. I've found that it is ...
2
votes
2answers
1k views

Custom webpart to set and get Property per user (PersonalizationScope.User)

I am trying to create a custom webpart in point to set and get a property per user on page. To change the background and save it per user. I'm using code like this: public static string ...
2
votes
2answers
113 views

Web part custom properties are cleared after save - until page refresh

I have noticed a bug that occurs on all custom web parts I created. Let's assume I have following web part (sandbox solution) with two properties: using System; using System.ComponentModel; using ...
2
votes
2answers
718 views

sharepoint webpart property disappear after a day (C#)

I developed a custom webpart with a webpart property with some textboxes and it works partially. If I deploy the project, the written text in the property is away. This is ok. But my MAIN Problem ...
2
votes
2answers
1k views

How to Show the loading message

i am working on a custom web part where i have a few dropdowns in the tool pane so it take a while to load the dropdownlist and i have total three dropdownlist... i need to show the Loading message ...
2
votes
1answer
430 views

PageViewer setting Height/Width

i am creating a dynamic Page Viewer web part from the user control code behind .. something like this: PageViewerWebPart oWebPart = new PageViewerWebPart(); oWebPart.ContentLink = ...
2
votes
1answer
167 views

Visual Web Part Property Validation in Sandbox Solution [SharePoint Online 2013]

How can I validate a custom web part property in a Sandbox solution (SharePoint Online 2013 environment)? I am throwing a WebPartPageUserException when validation fails, as shown below. private ...
2
votes
2answers
337 views

Webpart with custom properties - cancel does not work

I have implemented a webpart with custom properties in an editor part. If I click apply or ok, the values are successfully updated (code in OnPreRender). The problem is now that if I click apply and ...
1
vote
2answers
1k views

Custom properties in XSL

Is it possible to pull the value of a property, from a web part into XSL? I need to build something similar to the standard Summary Link Web Part, but would like to extend the default control with ...
1
vote
1answer
6k views

A Web Part or Web Form Control on this Page cannot be displayed or imported

I'm working on Create a Custom Web Part i'm able to do a build and run the new project in debug mode. However, after trying to add the new web part to the site, I get the following error. "A Web Part ...
1
vote
2answers
1k views

custom editor web part - disappears other property

Update: protected override void CreateChildControls() { // autopostback ddlTopic = new DropDownList { CssClass = ...
1
vote
2answers
59 views

Use a Managed Metadata Field as custom property of a WebPart

I'm trying to add a custom property to a WebPart to select multiple terms from a TermSet in SharePoint 2013. I have found this article: ...
1
vote
3answers
5k views

Sharepoint 2010 and Saving variables in VIEWSTATE

UPDATE1 I tried with EnableViewState in Page directive: but no avail. End I am running as a usercontrol in sharepoint. (using SmartPart) Everything's fine. Just the Viewstate-Variables! The ...
1
vote
2answers
2k views

Sharepoint 2010 Custom Properties via WebPart UserControl

I have a weather UserControl (defaulting to the headquarters location) . I have removed the ability to "Edit Web Part" because of branding and not wanting to have to train users on how to work the ...
1
vote
2answers
568 views

Inserting custom webpart to an ASPX page

Scenario : The 14 hive template/layouts folder has an ASPX page that is shown to users. I want to show some more information within that page. I am able to open that ASPX page. It has ...
1
vote
1answer
214 views

Setting the value of a sandbox web part's custom properties in .webpart file

I've created a new web part in a sandbox solution. This web part has a custom string property called 'PetName'. I'd expect to be able to set the initial value of this property in the .webpart file. ...
1
vote
1answer
546 views

Custom Web Part Properties in SharePoint 2010 Visual Web Parts-Dynamic Dropdown

I want to have a custom webpart property with a dynamic dropdownlist (data coming from sharepoint list). I was able to make a static dropdownlist as mentioned here. Can anyone help me how to make a ...
1
vote
1answer
403 views

Pass Parameter to specific instance of Web Part with GetLimitedWebPartManager

I'm passing parameters to a WebPart from a textbox to have a better UI experience for a personalizable WebPart which in this case takes the form of a twitter feed. The problem I have, is in the ...
1
vote
1answer
156 views

Changing WebPart Custom Property

I want to change a string inside my Code using the customization for the WebPart. Currently I created a custom WebPart Property like this: [WebBrowsable(true), Category("Miscellaneous"), ...
0
votes
3answers
738 views

Cascading DropDownList in Custom Editor Web Part using SharePoint 2010

Does anybody know how to achieve a cascading dropdownlist in an editor web part?
0
votes
2answers
225 views

Does webpart property validation code execute every page load

I have a custom webpart with custom webpart property. I have created a complex validation in the property. My question is, does this validation execute on every page load or happens only when ...
0
votes
2answers
89 views

MSDN example scenario

I am working with the MSDN example scenario creating creating a custom web part. Can anybody tell me why is it showing the square bottom div below (see in the image). It says "Bottom" and it ...
0
votes
3answers
1k views

SP 2010 The maximum number of Web Parts for all zones on this page has been exceeded

I am developing SharePoint web parts and as soon as I click on the left navigation to add a web part to the page I get the below error. I am using SP 2010 VS 2010 Server Error in '/' Application. ...
0
votes
2answers
106 views

How to fetch all list titles in editor part of web part?

I want to fetch all the list titles of the current site in a dropdown in my web part's editor part. Based on this selection I want to show list items in web part when Apply is hit. My web part is ...
0
votes
1answer
41 views

WebPart Properties

I would like to manage my WebPart Properties. I would store an ID -> this id is the id of a configuration for my webpart. First: How can i Store it? Second: How can i Find it? I'm using the ...
0
votes
1answer
128 views

Custom webpart property with mutiple fields

I have written a web part that has 3 extra properties that are all related. Right now each has its own title & input field. Is there a way I could make it 1 title with 3 fields? I was not ...
0
votes
2answers
341 views

Does web part property validation only work for visual web parts?

Suppose I define a web part property like this: private string _myString = "default value"; [WebBrowsable(true), WebDisplayName("My string"), WebDescription("A simple bit of text to ...
0
votes
1answer
152 views

How Can I Have Multiple Editor Part Collections?

I have created a web part in SharePoint 2007 which has over 40 controls and I was able to make two different Tool Part classes to hold the different sections of the custom controls. I am converting ...
0
votes
1answer
799 views

Set web part custom property when adding to page from code

We have a solution that adds All Assignments Web Part from Sharepoint Learning Kit into a page. Here are code snippets we use to do that: public static string AddWebPartToPage(SPWeb web, string ...
0
votes
1answer
453 views

how to access or have reference using web parts?

public partial class VisualWebPart1UserControl : UserControl { public string SetId{ get; set; } protected void ddl_SelectedIndexChanged(object sender, EventArgs e) { SetId = ...
0
votes
1answer
27 views

color picker in custom webpart properties

I want to have custom color picker in web part properties to let users select colors for headings. Any idea how to achieve this.
0
votes
1answer
121 views

Add RichtextBox editor in webpart properties

I have a requirement to add a rich text box in the custom properties of web part. Is it possible to add the rich text editor in custom properties of web part. The following links tells it is not ...
0
votes
1answer
237 views

Custom Web Part Properties in SharePoint 2010 Visual Web Parts-How to set it different for each user login

I have custom webpart properties for a visual webpart. This thread helped me develop the custom webpart properties. Now my issue is once a user sets the custom property it gets applied for all users, ...
0
votes
0answers
66 views

Custom Webpart Sections Missing on SitePage

I have a site collection in SharePoint 2010 that includes custom webparts and it is fully operational on my development server, which is just my desktop with Windows 7. For your knowledge, the ...
0
votes
1answer
73 views

Add web part properties in separate file

I am developping a web part that customizes the SharePoint Ribbon (hide or show buttons). Can I store some properties in a separate file? If the web part is active on three sites, I should have three ...
0
votes
1answer
517 views

creating advance custom property for a web part in sharepoint 2010

so far i able to create a custom property with with single control something like this: string _property1; public string Property2 { get { return _property2; } set ...
0
votes
0answers
75 views

how to validate custom web part property? [duplicate]

Possible Duplicate: How to validate Web Part property value? below is a custom prop and a code that i am using for my custom web part, my question is, how to validate a custom web part and ...
0
votes
1answer
213 views

how to have a hyperlink in custom web part property

i am working on a custom web part property and my question is how can i have hyper-link(seen in the below image) or bold or italic text in the custom property for the web part?