Solved

Add Paste to custom control

Posted on 2014-03-19
2
274 Views
Last Modified: 2014-03-20
I have a custom control which allows values to be pasted into it, but it doesn't have the "onpaste" method.  Trying to disable the ability for values to be pasted into this control, but can't.

Can I inherit this custom control and add the textbox.paste logic so that I can block it?
0
Comment
Question by:red_75116
2 Comments
 
LVL 12

Accepted Solution

by:
Jitendra Patil earned 500 total points
Comment Utility
you can try the below jquery
$(document).ready(function(){
      $('#txtInput').bind("cut copy paste",function(e) {
          e.preventDefault();
      });
    });

you can also try the link given below.
Disable cut, copy and paste in textbox using jquery, javascript

the above logic can be place in your control.

hope this helps.
0
 

Author Closing Comment

by:red_75116
Comment Utility
Thank you so much!  Link was exactly what I needed.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now