双击控件中的button,然后写 protected void Button1_Click(object sender, EventArgs e) { TextBox t= (TextBox)Page.FindControl("TextBox1"); t.Text = "ddd"; }
用户控件其实是有个类,月 定义一个他的对象就可以访问他的属性和方法了啊
TextBox的ID.Text = "值";