我最亲爱的说

子非鱼,焉知鱼之乐.

导航

[ASP.NET]

 public static int iA;
    protected void Button1_Click(object sender, EventArgs e)
    {
            //Label1.Text
            
            Response.Write("该变量的值为"+iA.ToString());
            iA++;

       
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)//只在页面第一次加载的时候运行意思
        {
            iA = 0;
            Response.Write("该变量的值为" + iA.ToString());
   
        }
        
    }

 

posted on 2013-09-11 10:35  我最亲爱的说  阅读(233)  评论(0编辑  收藏  举报