M
Mike Dole
I experimented with a usercontrol (TagedTextbox), I added a tag
property.
The tag value however is not persisted on postback (text value's
fine)?
I worked around it with:
Me.ViewState("tag") = txtToelichting.Tag
but what's wrong with my code?
[Code Snippet:]
Imports System.ComponentModel
Imports System.Web.UI
Namespace Greenbay
<DefaultProperty("Text"), ValidationProperty("Text"),
ToolboxData("<{0}:TagedTextBox runat=server></{0}:TagedTextBox>")>
Public Class TagedTextBox
Inherits System.Web.UI.WebControls.TextBox
Implements INamingContainer
Private _tag As String
Public Property Tag() As String
Get
Return _tag
End Get
Set(ByVal Value As String)
_tag = Value
End Set
End Property
End Class
End Namespace
Thanks in advance,
Mike
property.
The tag value however is not persisted on postback (text value's
fine)?
I worked around it with:
Me.ViewState("tag") = txtToelichting.Tag
but what's wrong with my code?
[Code Snippet:]
Imports System.ComponentModel
Imports System.Web.UI
Namespace Greenbay
<DefaultProperty("Text"), ValidationProperty("Text"),
ToolboxData("<{0}:TagedTextBox runat=server></{0}:TagedTextBox>")>
Public Class TagedTextBox
Inherits System.Web.UI.WebControls.TextBox
Implements INamingContainer
Private _tag As String
Public Property Tag() As String
Get
Return _tag
End Get
Set(ByVal Value As String)
_tag = Value
End Set
End Property
End Class
End Namespace
Thanks in advance,
Mike