在用户控件中如何才能得到调用这个控件的窗体呢?
我需要CS文件的代码,谢谢各位

解决方案 »

  1.   

    public class WebUserControl1 : System.Web.UI.UserControl
    {
            protected System.Web.UI.WebControls.TextBox TextBox1;
            protected System.Web.UI.WebControls.Button Button1; private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    }
     
            private void Button1_Click(object sender, System.EventArgs e)
            {
                 WebForm1 tmp = this.Page as WebForm1;
                 //.........
            }