摘要: Request.UrlReferrer可以获取客户端上次请求的url的有关信息。 这样我们就可以通过这个属性返回到“上一页”,示例如下1. 首先在Page_load中获得并储存该信息Page_load(object obj,EventArgs e) { if(!IsPostBack){ if(Request.UrlReferrer!=null)// {ViewState["UrlReferrer"]=Request.UrlReferrer.ToString();}} }l 页面回发后会改变Request.UrlReferrer,将其指向当前页面,所以需要进行判断:只有在第一 阅读全文
posted @ 2013-09-22 17:28 fulai_xy 阅读(388) 评论(0) 推荐(1) 编辑
摘要: 比如建立一个名为aspcn,值为灌水小鱼的cookieHttpCookie cookie = new HttpCookie["aspcn"];cookie.Value = "灌水小鱼";Response.AppendCookie(cookie);取出Cookie值也很简单HttpCookie cookie = Request.Cookies["aspcn"];cookieValue = cookie.Value;在一个Cookie中储存多个信息,那也没有问题。比如在名为aspcn的cookie下加多个信息HttpCookie cook 阅读全文
posted @ 2013-09-22 10:46 fulai_xy 阅读(320) 评论(1) 推荐(0) 编辑
摘要: 把localhost换成IP或域名1407为端口号给你一个例子:测试的url地址是, 结果如下: Request.ApplicationPath: /testweb Request.CurrentExecutionFilePath: /testweb/default.aspx Request.FilePath: /testweb/default.aspx Request.Path: /testweb/default.aspx Request.PathInfo: Request.PhysicalApplicationPath: E:\WWW\testweb\ Request.PhysicalPa 阅读全文
posted @ 2013-09-22 09:44 fulai_xy 阅读(245) 评论(0) 推荐(0) 编辑