<%@ Page language="VB" %>
<%@ Register TagPrefix="Control" Namespace="Control" Assembly="Control" %>
File: Default.vb
Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.ComponentModel
Namespace Control
Public Class ViewStateControl
Inherits System.Web.UI.WebControls.WebControl
Public Property Text() As String
Get
Dim _text As String = CStr(ViewState("Text"))
If _text Is Nothing Then
Return String.Empty
Else
Return _text
End If
End Get
Set(ByVal Value As String)
ViewState("Text") = Value
End Set
End Property
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
writer.Write(Text)
End Sub
End Class
End Namespace