用户控件属性的读写

首先添加属性

public string Text
{
get { return this.TextBox1.Text} 
set { this.TextBox1.Text = value; } 
}

然后引用页面就可以用控件实例名.Text来读取了。

posted on 2013-10-23 14:27  tongdengquan  阅读(129)  评论(0编辑  收藏  举报