M
Mario Krsnic
Hello everybody,
This works in vb.net. The value of n increments:
Public Class Form1
Dim n%
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
n = n + 1
Label1.Text = n
End Sub
End Class
The "same" thing does not work in ASP.NET (VWD 2005). The value of n remains
allways 1.
Partial Class _Default
Inherits System.Web.UI.Page
Dim n%
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
n = n + 1
Label1.Text = n
End Sub
End Class
What should I do to make n increase?
Thanks for every advice.
Mario
This works in vb.net. The value of n increments:
Public Class Form1
Dim n%
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
n = n + 1
Label1.Text = n
End Sub
End Class
The "same" thing does not work in ASP.NET (VWD 2005). The value of n remains
allways 1.
Partial Class _Default
Inherits System.Web.UI.Page
Dim n%
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
n = n + 1
Label1.Text = n
End Sub
End Class
What should I do to make n increase?
Thanks for every advice.
Mario