我想在自定义服务器控件中为这样的属性添加一些选项
[
Category("Appearance"),
DefaultValue(""),
Description("The text to display on the button.")
]
public string SomeProperty
{
get
{
EnsureChildControls();
return somevalue;
}
set
{
EnsureChildControls();
value;
}
}
所以我可以使用选项列表设置自定义控件属性,例如
当您设置控件 AutoPostBack 属性时,您可以在下拉列表中找到两个选项来选择“真”或“假”..
我想在我的自定义服务器控件中做一些类似的事情..