日期:2014-05-18 浏览次数:20368 次
/// <summary> /// 加载时用到的ViewState /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { DoInit(); if (!IsPostBack) { DoLoad(); Session.Remove("AttachInfoList");//清空上传文件 ddlspAudit.Attributes.Add("onchange", "changeShenheList()"); if (Request.UrlReferrer != null) { ViewState["URL"] = Request.UrlReferrer.ToString(); } } }
返回按钮事件用到的代码如下: /// <summary> /// 返回 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btn_back_Click(object sender, EventArgs e) { if (ViewState["URL"] != null) { Response.Redirect(ViewState["URL"].ToString()); } }