将复制URL从一个浏览器限制到另一个浏览器 [英] restrict copy url from one browser to another

查看:286
本文介绍了将复制URL从一个浏览器限制到另一个浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i想要一个例子来限制使用会话或隐藏字段或任何东西从一个浏览器复制和粘贴网址。



i添加每个页面加载的代码



string strPreviousPage ="" ;;

if(Request.UrlReferrer!= null)

{

strPreviousPage = Request.UrlReferrer.Segments [Request.UrlReferrer.Segments.Length - 1];

}

if(strPreviousPage =="")

{

Response.Redirect("〜/ Login.aspx");

}







但是这段代码只能使用chrome而不是Firefox和IE可以解决这个问题请


i want an example to restrict copy and paste url from one browser to another using sessions or hidden fields or any thing.

i add this code of every page load

string strPreviousPage = "";
if (Request.UrlReferrer != null)
{
strPreviousPage = Request.UrlReferrer.Segments[Request.UrlReferrer.Segments.Length - 1];
}
if(strPreviousPage =="")
{
Response.Redirect("~/Login.aspx");
}



but this code is working only chrome but not Firefox and IE can you solve this problem please

推荐答案

你好haisanthosh,



你能详细说明你的要求吗?您想为每个页面设置一些身份验证机制吗?
Hi haisanthosh,

Can you please elaborate your requirement ? Do you want some authentication mechanism for each page ?


这篇关于将复制URL从一个浏览器限制到另一个浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆