自定义控件问题
public class MyPanel : Panel
{
TextBox m_txt;
protected override void CreateChildControls()
{
base.CreateChildControls();
m_txt = new TextBox();
m_txt.ID = "txt1";
this.Controls.Add(m_txt);
}
public string TXT1Text
{
get { return m_txt.Text; }
}
}
我在文本框中输入值后,为什么服务器端得不到值?而且txt1的视图状态也不会被保存