Ken H.
asked on
How can I copy text from a text box to the clipboard
I am looking for a method to copy data from an asp.net webpage to the computers clipboard.
I've seen some people say use System.Windows.Forms - but when i try to declare that for import it doesn't show up. I've also read that you shouldn't use this in web applications.
What is the correct way to implement a simple copy to clipboard from a single multiline text box?
I've seen some people say use System.Windows.Forms - but when i try to declare that for import it doesn't show up. I've also read that you shouldn't use this in web applications.
What is the correct way to implement a simple copy to clipboard from a single multiline text box?
This seems to good tutorial - http://www.brangle.com/wordpress/2009/08/how-to-cutcopypaste-text-into-clipboard-using-vb-net/
Raj
Raj
ASKER
"Clipboard" is not an available control for me. I have System.Web.UI.Control declared. What am i missing?
ASKER
I'm not sure the second link is good because that is for windows forms. I read somewhere that in asp.net you should use the System.Web.UI controls not System.Windows.Forms
Yes. I got confused that you are in windows forms. Let me check for Asp.Net
Raj
Raj
I believe - this is the right solution for you in ASP.Net - http://forums.asp.net/t/1077651.aspx
Using clipboardData Object - http://msdn.microsoft.com/en-us/library/ms535220.aspx
Hope this helps
Raj
Using clipboardData Object - http://msdn.microsoft.com/en-us/library/ms535220.aspx
Hope this helps
Raj
ASKER
from what I have been reading it looks like to do this in a web page requires javascript. the copy to clipboard cannot be performed from the code behind page. still researching just fyi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Using the VB clipboard object with multiple users can cause undesired results. Keeping it on the host side is the best answer and because of browser security and difficulty to implement cross platform I'm going to give jagrut_patel credit. That thread does make a valid point. While nice to fully automate the process it's probably best not to especially when folks using this app will be running an assortment of browsers because thats what people in my company do for some reason.
Like explained here - http://bytes.com/topic/visual-basic-net/answers/347730-copy-cut-paste
Raj