将复制URL从一个浏览器限制到另一个浏览器 [英] restrict copy url from one browser to another
问题描述
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屋!