I am new to asp.net. I am creating a ASP.net website using VB.net. So here's my problem
Dim myCounter as Integer = 0
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Button1.Click
myCounter = myCounter + 1
Label1.Text = myCounter.ToString()
end Sub
As expected I always get Label Text as 0 each time click the button. How to I create global variable and increment it.