M
Mike
Why does this work:
***********************
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code ".....
Private y As String = "Hello"
Property Prop() As String
Get
Return y
End Get
Set(ByVal Value As String)
y = Value
End Set
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Prop = "GoodBye"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Label1.Text = Prop
End Sub
End Class
***********************
....and not this?
***********************
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code ".....
Private y As String = "Hello"
Property Prop() As String
Get
Return y
End Get
Set(ByVal Value As String)
y = Value
End Set
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Label1.Text = Prop
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Prop = "GoodBye"
End Sub
End Class
***********************
Thanks in advance for your help
Mike
***********************
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code ".....
Private y As String = "Hello"
Property Prop() As String
Get
Return y
End Get
Set(ByVal Value As String)
y = Value
End Set
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Prop = "GoodBye"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Label1.Text = Prop
End Sub
End Class
***********************
....and not this?
***********************
Public Class WebForm2
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code ".....
Private y As String = "Hello"
Property Prop() As String
Get
Return y
End Get
Set(ByVal Value As String)
y = Value
End Set
End Property
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Label1.Text = Prop
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Prop = "GoodBye"
End Sub
End Class
***********************
Thanks in advance for your help
Mike