Creating the templated control's inner control class (VB) : Panel « Custom Controls « ASP.NET Tutorial






Public Class Message
    Inherits System.Web.UI.WebControls.Panel
    Implements System.Web.UI.INamingContainer

    Private _name As String
    Private _text As String

    Public Sub New(ByVal name As String, ByVal text As String)
        _text = text
        _name = name
    End Sub

    Public ReadOnly Property Name() As String
        Get
            Return _name
        End Get
    End Property

    Public ReadOnly Property Text() As String
        Get
            Return _text
        End Get
    End Property
End Class








14.10.Panel
14.10.1.Creating the templated control's inner control class (C#)
14.10.2.Creating the templated control's inner control class (VB)