Friday, May 17, 2013

SharePoint how to place a check box and Dropdownlist in a webpart Tool pane\part

Scenario: How to place custom checkbox and dropdownlist in WebPart toolpane

Solution: Declare a new property of type "Enum" this will place a DropdownList.
For check box declare a property of type Boolean. Also Properties of type String, DateTime and Integer render a textbox.

 Useful webpart attributes when defining custom properties are:-
1. [WebBrowsable(true)]
2.[ Personalizable( PersonalizationScope.Shared)]
5.[ Category("")]