如何在asp.net中复制粘贴功能 [英] How to disble copy paste function in asp.net

查看:110
本文介绍了如何在asp.net中复制粘贴功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。



我必须在asp.net中为我的Gridview控件禁用复制粘贴功能。这可以吗?

请给我一些想法。



答案表示赞赏



谢谢你: - )

Hi.

I have to disable copy paste function for my Gridview control in asp.net.how could it be done?
please give me some idea.

Answers are appreciated

Thank u:-)

推荐答案

请检查以下链接:

Link 1 [ ^ ]

Link 2 [ ^ ]

Link 3 [ ^ ]



祝你好运,

OI
Please check the following links:
Link 1[^]
Link 2[^]
Link 3[^]

Good luck,
OI


最简单的方法是使用javascript。



如果gridview中有一个文本框,则添加blur()函数,使其失去焦点,无法复制,粘贴,拖放。



The easiest way is by using javascript.

If you have a textbox in the gridview add the blur() function so that it losses its focus and will not be able to copy, paste, drag or drop.

<asp:textbox id="TextBox1" runat="server" ondrop="blur();return false;" onpaste="return false"></asp:textbox>





试一试。快乐编码:)



Try it out. Happy Coding :)


这篇关于如何在asp.net中复制粘贴功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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