Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

<DefaultProperty("HeaderText"), _
 ToolboxData("<{0}:WebCustomControl1 runat=server></{0}:WebCustomControl1>"), _
 Themeable(False)> _
Public Class WebCustomControl1
    Inherits WebControl

    <Bindable(True), Category("Appearance"), DefaultValue("Enter Value"), _
     Localizable(True)> Property HeaderText() As String
        Get
            Dim s As String = CStr(ViewState("HeaderText"))
            If s Is Nothing Then
                Return String.Empty
            Else
                Return s
            End If
        End Get

        Set(ByVal Value As String)
            ViewState("HeaderText") = Value
        End Set
    End Property


    Protected Overrides Sub RenderContents(ByVal output As HtmlTextWriter)
        output.Write("<h1>" & HeaderText & "<h1>")
    End Sub

End Class
