Click here to Skip to main content
16,020,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Coders,

I'm trying to copy a string found in my web page to Clipboard. how can we do this in ASP.NET?

Thanks in advance.
Posted

You'll need to use JavaScript as it's on the client. JQuery can help you:

http://plugins.jquery.com/project/copy[^]
 
Share this answer
 
window.clipboardData.setData('Text' , 'SomeValue' );

Please note you can't change the 'Text' keyword.
// get the clipboard data
var emailText = window.clipboardData.getData('Text');


If you want to set it into CS file you can do it using script tag
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900