Asp.net中判断是否是指定页面请求的代码示例
//获取请求网址,非法请求,返回主页 if (Request.UrlReferrer != null) { string requstUrl = Request.UrlReferrer.AbsolutePath.ToString(); if (requstUrl != "/Goods/SubmitOrder.aspx") { Response.Redirect("../Activity/Default.aspx"); } } else { Response.Redirect("../Activity/Default.aspx"); }
个人原创博客,转载请注明来源地址:https://www.cnblogs.com/xyyt