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 renderOption(), the displayEditMode(), displayDesignMode().

1 Answer 1


This article from Microsoft describes exactly how to use web part properties: http://msdn.microsoft.com/en-us/library/dd584174(v=office.11).aspx

Basically, you mark (decorate) a c# Property in your code as follow:

[WebDisplayName("Display Name")]
[WebDescription("My Description")]

public string MyProperty { set; get; }

Next up, you can access the property directly in your code:

string propertyValue = this.MyProperty;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.