Click here to Skip to main content
12,756,892 members (36,562 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET Windows
Hi,
I have a windows application which puts some text data onto the clipboard when a drag operation is initiated. I also have a C# asp.net 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.
Posted 8-Jan-13 3:24am
derek99993.2K

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
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)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100