日期:2014-05-17 浏览次数:20377 次
private string a;
protected void Page_Load(object sender, EventArgs e)
{
Label1.EnableViewState = false;
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "1";
a = "1";
}
protected void Button2_Click(object sender, EventArgs e)
{
Label2.Text = a;
}
protected void Button1_Click(object sender, EventArgs e)
{
ViewState["_a"]= (ViewState["_a"]==null?1:int.Pase(ViewState["_a"].ToString())) +1;
Label1.Text = ViewState["_a"].ToString();
}