如何防止打开网页使用复制并粘贴新窗口或选项卡中的网址 [英] how to prevent to open a web page using copy and paste the url in new window or tab

查看:82
本文介绍了如何防止打开网页使用复制并粘贴新窗口或选项卡中的网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii



i我正在制作一个网络应用程序,其中我发现了id但它没有阻止使用复制打开同一页面或在新窗口中粘贴网址或标签。怎么可能plz任何人告诉我



提前谢谢

解决方案

创建一个名为的页面它是ErrorPage.aspx并在页面中给出消息。

现在,在您当前的页面中使用以下代码:



 受保护  void  Page_Load( object  sender,EventArgs e)
{
if (!IsPostBack)
{
if (会话[ TransIDId] == null
{
Response.Redirect( ErrorPage的.aspx);
}
}
}


hii

i am making a web application in which i amke seesion of id but it did not prevent to open same page using copy or paste the url in new window or tab. how it is possible plz any one tell me

thank you in advance

解决方案

Create a page named it "ErrorPage.aspx" and give message in page.
Now, in your current page Use below code:

protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           if (Session["TransIDId"] == null)
           {
               Response.Redirect("ErrorPage.aspx");
           }
       }
   }


这篇关于如何防止打开网页使用复制并粘贴新窗口或选项卡中的网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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