Click here to Skip to main content
15,846,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a windows application which puts some text data onto the clipboard when a drag operation is initiated. I also have a C# web page which needs to respond to a drop event and interpret what's on the clipboard.

From the research I've already carried out detecting the drop seems quite easy ('just' some javascript) but there are complications with a web page accessing the clipboard, such as security and browser specific problems.

Has anyone here had any experience with this kind of scenario?

Note that I can't change the windows application but I can add code to the website.

1 solution

window.clipboardData.getData('Text') apparently works in IE, but no other browser. So long as the drop is text only, and the user will probably be prompted, as you would hope.
Share this answer
derek9999 9-Jan-13 4:41am    
Thanks for the suggestion. I have to support IE, Firefox and Chrome (as a minimum) so the security issues will be a problem. What do you mean by 'and the user will probably be prompted, as you would hope'? Is it because the user has to be an administrator to access the clipboard?
Christian Graus 9-Jan-13 4:53am    
My reading is that it can only work in IE. I meant, as a user of the internet, you hope your browser is secure.
derek9999 9-Jan-13 5:01am    
Sorry it's been a slow morning! So is there another method to use for non-IE browsers?
Christian Graus 9-Jan-13 5:03am    
I only did a quick google, but not as far as I can see.
derek9999 9-Jan-13 5:13am    
OK thanks for spending some time on this. I'll give my boss the good news...

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