winformè¿æ¯asp.net
对äºasp.net
protected void Button1_Click(object sender, EventArgs e)
{
int hits;
if (ViewState["hits"] == null)
{
hits = 0;
}
else
{
hits = (int)ViewState["hits"];
}
hits++;
ViewState["hits"] = hits;
this.TextBox1.Text = hits.ToString();
}
对äºwinform
public int i;
private void button1_Click(object sender, EventArgs e)
{
i++;
this.textBox1.Text = "åå»äº"+i.ToString()+"次";
}
private void Form1_Load(object sender, EventArgs e)
{
i = 0;
}
以ä¸ä»£ç vs 2005 vs 2008åè°è¯éè¿
追é®winform, æ详ç»æ¥éª¤ä¹ ï¼æ°æ 谢谢