取得用户控件的值

来源:互联网 发布:iphone4s淘宝 编辑:程序博客网 时间:2024/05/22 03:52

在ascx中:
 public string test
    {
        get{return TextBox1.Text;}
    }


在ASPX中调用:
 protected void Button1_Click(object sender, EventArgs e)
    {
        string str = Kz1.test;
        Label1.Text = str.ToString();
    }

原创粉丝点击