假设你的文本框是一个TextBox控件,那么可以把这个TextBox的Text设为用户控件的一个公共属性,在包含页中就可以直接赋值或者取值。

解决方案 »

  1.   

    http://expert.csdn.net/Expert/topic/2414/2414678.xml?temp=.8467066
      

  2.   

    public string TextBoxValue
    {
    af
      

  3.   

    http://chs.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx
      

  4.   

    在控件。ascx中定义属性
    public string Mytext
    {
    get{ return this.TextBox1.Text;}
    }在应用控件的aspx中
    protect Yourcontrol Yourcontrol1;
    string s=Yourcontrol1.Mytext;
      

  5.   

    同意 2002pine(我学习,我存在) 的说法,不可以定义成私有的哟!其中GET是只读的...
      

  6.   

    protect Yourcontrol Yourcontrol1;
    Yourcontrol1是控件名吗,Yourcontrol是什么