lamy Posted February 8, 2006 Posted February 8, 2006 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 <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 MyLabel.Text = MyControl.Text anyone? :confused: Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
lamy Posted February 8, 2006 Author Posted February 8, 2006 found the problem, my control in my web form has ReadOnly set to True (was hoping itll still pass the value since HTML form doesnt pass values only when its disabled) any workaround for this? Quote slow down when you need to hurry, stop when you need to move on, look back when you need to forget, or you might slip and leave sanity
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.