I need some help passing data to and from a usercontrol.
In the following Property DisplayValue,
If I hard code a return value (Return "Test Data"), then the data gets
returned.
If I work with any kind of assigned value, the return value is blank!
Any idea on what I am doing wrong?
Public Class UserControl1
Public saveVal As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
DisplayValue = TextBox1.Text
End Sub
Public Property DisplayValue() As String
Get
If saveVal <> "" Then
Return saveVal ' "Test Data" ' TextBox1.Text
Else
Return "Lost Value"
End If
End Get
Set(ByVal Value As String)
saveVal = Value
End Set
End Property
End Class
-----------------------------------------------------------
Gary Kahrau - VP
ka****@monair.com (W)
Stellex Monitor Aerospace Corp.
-----------------------------------------------------------