SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

so far i able to create a custom property with with single control something like this:

string _property1; 
public string Property2 
         return _property2; 
         _property2 = value; 

but i am looking to have little bit advance something like this:

a textbox with dropdownlist

any idea how would i do that or any link?


share|improve this question
up vote 0 down vote accepted

Please see the section on custom web part properties.

Short version:

  • Textbox - String/Int
  • DropDownList - enum
  • Checkbox - bool

Alternatively, if you are looking for more functionality, take a look at EditorParts. This link is for 2007, but it should work the same way. Notice that YOU control the markup that is written to the edit mode properties of the web part.

share|improve this answer
Tim, i read the blog before i post here, and the blog did not talk about having dropdownlist with textbox – Nick Kahn Sep 8 '11 at 19:20
what i am looking is TextBox next to it is DropDownList so for an example, i will have a list of items to select from DDL and textbox to enter the value. – Nick Kahn Sep 8 '11 at 19:25
Gotcha. I think you might be over thinking it then. Why can't you have two separate properties? An enum that defines the DDL values, and the string for the textbox value. – Tim Gabrhel Sep 9 '11 at 3:11
Abu, I've updated my answer with an alternative approach. – Tim Gabrhel Sep 9 '11 at 14:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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