关于返回前面的页面。如何两者兼得,自问自答

发表于:2007-06-30来源:作者:点击数: 标签:
private void Page_Load(object sender, System.EventArgs e)
        {
            
            ViewState["submittimes"]=Convert.ToInt32(ViewState["submittimes"])+1;
                        if(!Page.IsPostBack)
            {
                ViewState["submittimes"]=1;


            }
        }

页面:
<INPUT type="button" value="Button" onclick=@#history.go(-<%= (int)ViewState["submittimes"] %>)@#>  

原文转自:http://www.ltesting.net