大家好!
我制作自定义用户控件(ascx),页面中有,TextBox,RadioButton,CheckBox,请问:
我如何在ASPX文件中引用这个用户控件时,TextBox,RadioButton,CheckBox如何传递,如何将页面录入值传递到数据库,浏览时如何将数据库值传递回页面!
谢谢!

解决方案 »

  1.   

    譬如在用户控件里,比如TextBox可以加个Text属性public property Text() as string
    Get 
       Return TextBox1.Text
    End Get
    Set(byval value as string)
      TextBox1.Text=Value
    End Set
    End property
      

  2.   

    加属性
    Public Property BoxWidth()
            Get
                Return textbox1.text
            End Get
            Set(ByVal Value)
                textbox1.text = Value
            End Set
        End Property
        Private cW1 As Integer
        Public Property ColumnWidth1()
            Get
                Return cW1
            End Get
            Set(ByVal Value)
                cW1 = Value
            End Set
        End Property
        Private cW2 As Integer
        Public Property ColumnWidth2()
            Get
                Return cW2
            End Get
            Set(ByVal Value)
                cW2 = Value
            End Set
        End Property
      

  3.   

    楼上的,该不会都是用VB.NET的吧,哈哈!...