0

Can any one please help me how to copy text into clipboard on asp.net button click.on button click text has copied into clients clipboard.

Thanks AnkiReddy

ankireddy
  • 1
  • 1

1 Answers1

0

Try this. It works with IE.

<textarea id='txtCopyToClipboard' rows="3">This text will copy to your clipboard</textarea>
<br />    
<input type="button" id='btnCopy' text="ClickHereToCopy"
onclick="clipboardData.setData('Text',document.getElementById('txtCopyToClipboard').value);"
Syed Ali Taqi
  • 4,898
  • 3
  • 34
  • 44