lamy
Regular
i have a usercontrol with a textbox control in it, im trying to make a "Text" property for it with both get and set, setting a value isnt a problem but somehow i cant manage to retain the value of the textbox as it postback
doing this wont work if i typed-in anything and submit the form
anyone?
Visual Basic:
<Bindable(True), Category("Appearance"), DefaultValue("")> _
Public Property Text() As String
Get
Dim obj As Object = ViewState("Text")
If Not (obj Is Nothing) Then
Return CType(obj, String)
Else
Return String.Empty
End If
End Get
Set(ByVal value As String)
ViewState("Text") = value
End Set
End Property
doing this wont work if i typed-in anything and submit the form
Visual Basic:
MyLabel.Text = MyControl.Text
anyone?