自动返回上次请求页面
1
protected void Page_Load(object sender, EventArgs e)
2
2 {
3
3 ViewState["UrlReferrer"] = Request.UrlReferrer.ToString();
4
4
5
5 HyperLink1.NavigateUrl = (string)ViewState["UrlReferrer"];
6
6 Response.Write((string)ViewState["UrlReferrer"]);
7
7 }
![](/Images/OutliningIndicators/None.gif)
2
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
3
![](/Images/OutliningIndicators/InBlock.gif)
4
![](/Images/OutliningIndicators/InBlock.gif)
5
![](/Images/OutliningIndicators/InBlock.gif)
6
![](/Images/OutliningIndicators/InBlock.gif)
7
![](/Images/OutliningIndicators/ExpandedBlockEnd.gif)