Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls

<DefaultProperty("Text"), ToolboxData("<{0}:AspCompo runat=server></{0}:AspCompo>")> Public Class AspCompo
    Inherits System.Web.UI.WebControls.WebControl

    Dim _text As String

    <Bindable(True), Category("Appearance"), DefaultValue("")> Property [Text]() As String
        Get
            Return _text
        End Get

        Set(ByVal Value As String)
            _text = Value
        End Set
    End Property

    Protected Overrides Sub CreateChildControls()
        Dim ctlTxt As New TextBox()
        Dim ctlLbl As New Label()

        ctlLbl.Text = Me.ID
        Me.Controls.Add(ctlLbl)
        ctlTxt.Text = Me.Text
        ctlTxt.ID = Me.ID
        Me.Controls.Add(ctlTxt)
    End Sub

    Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
        output.Write(Me.ID & "<INPUT name='" & Me.ID & "' Value='" & Me.Text & "'>")
    End Sub

End Class
