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

Top 5 Contributors of the Month
Post New Web Links

Customizing Web Part Properties

Posted By:      Posted Date: August 26, 2010    Points: 0   Category :SharePoint

 I am writing a web part for SharePoint. To define a custom property that will render as a dropdown list in tool pane For That I need the variable in a type of enum.But that dropdownlist has to be populated dynamically(i.e droplist items are supposed to the list&document lib names in the entire site collection),Which is not supported by Enum.I am extremely new to coding.any help is highly appreciated .

Thankz in advance.



View Complete Post

More Related Resource Links

Security Briefs: Customizing GINA, Part 2


GINA, the Graphical Identification and Authentication component, is a part of WinLogon that you can customize or replace. Last month I introduced GINA customization; this month, I'm going to drill down to implement each of the GINA entry points.

Keith Brown

MSDN Magazine June 2005

Security Briefs: Customizing GINA, Part 1


Over the years I've had many people ask me to write about GINA, the Graphical Identification and Authentication component that serves as the gateway for interactive logons. This month I'll begin my coverage of this topic to help you get started if you're tasked to build such a beast.

Keith Brown

MSDN Magazine May 2005

Web Part Versioning and Deployment (properties only)


Suppose I have a 3<sup>rd</sup> party Web Part (source code provided, with Web Part deployed as a Feature) that’s installed and used in several Sites within a Site Collection.  I want to make changes not to the source code (which would require updating the assembly and deploying the changes as an updated Feature/Solution Package), but to property values of the Web Part that exist.  Say the WP exists on 10 pages, and I want to change the WP’s Title property from “Amazing Vendor Web Part” to “My New Title”.


First, would this be considered an “out-of-band” patch?  Not that it matters terribly how to label this…


Second, would the ideal approach be to simply add code within a Feature Receiver in that Web Parts VS project (the Feat

Customizing the Content Query Web Part in SharePoint Server 2007

Walk through how to customize the Content Query Web Part in SharePoint Server 2007 to query content across multiple sites in a site collection and display the results in any way that XSL can support. Learn how to get similar results when customizing the CQWP does not meet your needs.

Customizing the display for a ListView Web Part

I want to customize the display of a ListView Web Part. I tried following this [http://msdn.microsoft.com/en-us/library/ff604024.aspx] article, but I'm not having any success. Has anyone done something like this before? I need a very simple and basic view from which I can build upon. Like displaying only the Title field of a list without the column headers and other stuff. Thanks!

Web Part Properties issue


Hi there,

I've create a custom object for my web part. I can compile  the web part or web part editor without any issue.  However, when I click "Apply" or "Ok" on the Web Part Editor (this is where I've to update the CustomObject value, I have debugging it line by line there was NO error at all) But an error message raise on the top on the editor.

"Cannot save all of the property settings for this Web Part. An error has occurred."


Any idea what could cause this? or how should I debug this one? Thanks!


  [WebBrowsable( false ), WebDescription( "Custom Object" ), WebDisplayName( "Custom Object" ), Personalizable( PersonalizationScope.User )]
  public CustomObject ProjectCustomFieldsInfo {



How does web part stores its properties when a piece of code is executed in it?



I am trying to program my first webpart based on this:


This webpart must show people who have birthdays on particular day of the month. There should be a button for each month (and one for "whole year) and button for each day (and one for "whole month") and so user can choose to show only those with birthdays in say, april 23, or whole june...

I did it this way:

Following the tutorial, i create all my controls inside the CreateChildControls() and i store references to them as properties of the webpart class. Also the class (public class BirthdayFullScreenWebPart) has properties (int chosen_month) and (int chosen_day).

Then i have have onclick for buttons that changes the chosen month and/or day web part property, based on which button was clicked.

Then i have a function "UpdateUserList" that ouptuts list of users into the webpart's table control, based on the chosen month and day. this function is called inside createchidlcontrols after all of them are created, and inside onclicks when the month/day is changed.


What i got is that the values of the variables were behaving really odd. 

In my mind, it

Issues after customizing Content Query Web Part


I have used CQWP in my SHarepoint 2010 application where i have done following steps..

1.Add CQWP

2.Provide query to use content

3.Exported the CQWP

4. Change the properties in .webpart file (itemXSL link, mainXSL link, XSL) to refer to my cutomized ContentQueryMain.XSL and ItemStyle. XSL, these 2 XSL's are stored in new folder in Style library

5.After the changes when i import the web part i am not able to open the properties when CQWP is applied in my UI (on clicking EditWebpart)

Kindly provide me some ideas so that i can resolve this problem..!!

Customizing Content Query Web Part (SP-2007)


Hi , i tried following to customize the CQWP as


connect the CQWP and configure according with my new "Template".

Add Column as 

<property name="CommonViewFields" type="string">Title, Text; Description, Note;</property>

 every thing is file but when i want to show this in another page again i have to do this again (Export and Import add "CommonViewFields".

 My Question is that is there any other method so that i don't have to add the "CommonViewFields" only have to change the XSL Template ....


Thanks and Regards Er.Pradipta Nayak

SummaryLinkWebPart : Access Denied saving Web Part properties after migration to Moss 2010


Hi everyone,

i got the error below when i access pages containing a SummaryLinkWebPart. The error occured only with user having non-administrative privilege.

The curious thing is that after an administrator access one of this pages, it starts to work for non-administrative users too.

The site collections containing these pages has been migrated from Moss 2007 to Moss 2010.

I'd like to find a better solution than navigate through all my pages with site collection administrator account.

Any suggestion would be very appreciate

Access Denied saving Web Part properties: either the Web Part is embedded directly in the page, or you do not have sufficient permissions to save properties

Custom web part properties are not saved in SharePoint 2010 visual web part


I have created my first visual web part in SP2010.  In 2007 version I didn't use user controls so all of my code was in a single file for the most part.  Now I've separated out the code.  Everything works great and I like this a lot better (more like traditional ASP.NET development) with one exception.  In my bootstrap .cs file (I call it that because it does nothing but load the user control file) I put all of my custom web part properties.  Then in my web part code-behind I reference them thru an instance of the containing class.  I must have something incorrectly configured because none of the changes to the properties at runtime are getting updated in the code.  Here's a filtered view of how I have it wired together:

Sample property in the top level .cs file:

private string m_ImagePath = "sites/myapp/images1/branded_image.png";
   WebDisplayName("Relative path to header image"),
   WebDescription("Relative path to header image"),

Custom Properties in Advanced Search Web Part - a bug??



we are trying to configure the advanced search web part and add some custom properties. Those properties are of type managed metadata.

We saw the following sample:


When try to use the web part, for example by add the property "product" and then search "when [product]="valueA",

we get not only results where the item has a property "product=valueA",

but also any item where in its body (full text) there is "valueA".

This behavior doesn't occur when searching non-custom property (for example "author=keren").

Is that a bug or are we missing something in the customization?

thanks a lot!



keren tsur

Web Part Properties - Need InputFormTextBox to open in a new window.


Hi All,

I have developed a web part for SP2010. It inherits from the EditorPart class and uses an InputFormTextBox control. My problem is that the control appears in the web part properties in it's complete form (taking up alot of space).

Does anyone know how I can replicate the feature of the Content Editor Web Part by having a button open a window like RTE2PUEditor.aspx for editing?


To Configure Search Box Web Part properties


I need configure the Search Box Web Part properties to add a custom scope HR to it. Are these steps below the right steps?
  1. Navigate to the Search Center site.
  2. In the Search Center, click the Site Actions menu, and then click Edit Page . The Search page opens in Edit mode.
  3. In the Search Box Web Part, expand the Edit drop-down list, and then click Modify Shared Web Part .
  4. In the Search Box tool pane, expand the Scopes Dropdown node.
  5. Expand the Miscellaneous node.

In the Scope Display Group box, type the name of the scope display group "HR" that you want to display in the scopes drop-down list. By default, the value of this property is Search Dropdown .

Please let me know the solution to this issue as soon as possible.


Thanks and Regards,



Customizing Most Viewed Content Web Part


I added a Web Analytics web part to my sharepoint page and opted for it to display the most viewed content. Is there a way to get these results to show page titles instead of urls?




Web Part Error: "The Height and Width properties do not ..."


I,ve made a asp webpart based on two datagridviews, a textbox and a button. It works fine under asp.net, but when deployed under MOSS2007 it shows the textbox and button.

When the button is pushed (with a search argument) the following error apears.

Web Part Error: The Height and Width properties do not support proportional metrics (for example, 20%).

Can anyone tell me what this means?




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