20 July 2010

Create WebPart Properties with Drop Down Items.

 
Dealare field

protected WeekDays _daysWeek = WeekDays.Sun;

/// Days of the Week to be appended in the Dropdown List

public enum WeekDays
{
Mon,
Tue, Web, Thur, Fri, Sat, Sun
};
/// Properties
[Personalizable(PersonalizationScope.Shared)]

[WebBrowsable(true)] [System.ComponentModel.Category("My Zone")]
[WebDisplayName("My DropDown Property")] [WebDescription("Get webpart properties
with DropDown")]
public WeekDays SelectedDay
{
get 
{ return _daysWeek; }
set 
{ _daysWeek = value; }
}






No comments:

Post a Comment

Thanks for your valuable comments

Rate Now: