i want to add some options to a property like this in custom server control
[
Category("Appearance"),
DefaultValue(""),
Description("The text to display on the button.")
]
public string SomeProperty
{
get
{
EnsureChildControls();
return somevalue;
}
set
{
EnsureChildControls();
value;
}
}
so i can set custom control property using list of options for example
when you set a control AutoPostBack property you can find two options in dropdown list to choose "true" or "False" ..
i want to do some thing like that in my custom server control..
Try this
This is simple Demo..If you want to Option than try to use enum type property
aspx page
User Control
User Control Code behind