控件很简单, 
首先在构造函数创建控件: 
public   AutoChooserControl()   :   base() 

_txtChooser   =   new   TextBox(); 
text   =   _txtChooser.Text; 
_imgdropDownButton   =   new   Image(); 

接着重写CreateChildControls,为控件增加属性 
protected   override   void   CreateChildControls() 
_txtChooser.Text   =   text; 获取值的属性: 
[Browsable(true),   Description("默认值"),   Category("Data"),   DefaultValue("")] 
public   string   Text 

get 

//EnsureChildControls(); return   text; 

set 

text   =   value; 

} 谢谢啦