The Demo Project - Upon initiation the demo loads an Asp.Net text box with some lines of text. Click the 'Copy to Clipboard' button to initiate the copy action.
The number of characters copied to the clipboard is reported.
Warning Dialog - The following IE dialog is opened when the copy button is pressed. Click 'Allow Access' to copy the text to the clipboard.
Question - Is there anyway to prevent the dialog from being displayed? I have seen at least one web site that will copy stuff to the clipboard without displaying the dialog. Do you know how they do it? If you do I will add your code to this page and give you credit for it.
var data = document.getElementById(sTextBoxID).value;
Code Behind Page - Typical code added to the VB.Net code behind page is:
Dim oCTT As New cCopyTextBoxTextToClipboard
Download VB.Net Code
Download - VS2005 VB.Net Zipped File Size Copy Text To Clipboard CopyToClipboard.zip 29K
Previous Tip Tip Index Next Tip