I've done a bit of C++ programming but I'm new to c#.
I wrote a simple app to count how many times a user clicked a button and then display that count on the button.
On the first click it works, but after that it stays at 1. Any suggestions? Thanks in advance
public partial class Default : System.Web.UI.Page
{
private int clickcount = 0;
public virtual void button1Clicked (object sender, EventArgs args)
{
clickcount++;
button1.Text = "You clicked me "+clickcount.ToString()+" time";
}
public virtual void GreetButtonClicked (object sender, EventArgs args)
{
GreetButton.Text = "Hello "+TextInput.Text;
}
}