Request.ServerVariables(HTTP_REFERER)&数据提交时注意的问题
来源:互联网 发布:ubuntu挂起后如何启动 编辑:程序博客网 时间:2024/05/30 23:02
来自:http://www.cnblogs.com/zhangpengshou/archive/2007/09/24/904074.html 特此感谢
作用:得到访问的上一页的Url
Request.ServerVariables["HTTP_REFERER"]可用的情况
1.直接用<a href>
2.用Submit或<input type=image>提交的表单(POST or GET)
3.使用Jscript提交的表单(POST or GET)
Request.ServerVariables["HTTP_REFERER"]不可用的情况
1.从收藏夹链接
2.单击'主页'或者自定义的地址
3.利用Jscript的location.href or location.replace()
4.在浏览器直接输入地址
5.<%Response.Redirect%>
6.<%Response.AddHeader%>或<meta http-equiv=refresh>转向
7.用XML加载地址
Asp.net 示例
public partial class FileManage_EditSoftWare : System.Web.UI.Page
{
private static string strLastPageUrl = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
strLastPageUrl = Request.ServerVariables["HTTP_REFERER"].ToString();
}
}
//返回
protected void btnReturn_Click(object sender, EventArgs e)
{
Response.Redirect(strLastPageUrl);
}
}
- Request.ServerVariables(HTTP_REFERER)&数据提交时注意的问题
- Request.ServerVariables("http_Referer")取不到值问题.
- :Request.ServerVariables("HTTP_REFERER")的工作方式
- Request.ServerVariables("HTTP_REFERER")的工作方式
- Request.ServerVariables("HTTP_REFERER")的工作方式
- Request.ServerVariables(HTTP_REFERER)
- Request.ServerVariables("HTTP_REFERER")不能使用
- 关于 Request.ServerVariables("HTTP_REFERER") 运行时会出错的原因
- Request.ServerVariables(HTTP_REFERER) 适用和不适用的情况
- Request.ServerVariables(”HTTP_REFERER”)防止下载盗链
- Request.ServerVariables(”HTTP_REFERER”)防止下载盗链
- ASP解决 request.ServerVariables("HTTP_REFERER") 乱码
- ASP 使用 Request.ServerVariables(HTTP_REFERER) 方法获取请求页面地址的注意事项
- Request提交中文数据的乱码问题
- 全部的Request.ServerVariables
- Request.ServerVariables的参数
- Request.ServerVariables的用法
- ASP中的ServerVariables("HTTP_REFERER")
- 解释结构模型ISM
- 黑客菜鸟必须掌握的几个dos命令
- 形态学去噪
- OCP-1Z0-053-V12.02-47题
- 单例模式之线程安全解析
- Request.ServerVariables(HTTP_REFERER)&数据提交时注意的问题
- Cocos2d-x + Android + Eclipse + Windows 7
- Linux下安装Python3.3.0
- 后缀树求最长子字符串
- 【§狼族少年之淳伊美女主题(oo)】
- smack 小例子
- IO分层与IO模型
- Rman-03002,Rman-12010,Rman-12012
- 【什么情况下U盘会出现0字节?】