How to copy a text in asp.net page into Clipboard using vb.net code-behind ?
And what libraries to import ?
Asked
Active
Viewed 3,739 times
1

John Saunders
- 160,644
- 26
- 247
- 397

Ahmed
- 179
- 5
- 14
1 Answers
3
You can't copy text into clipboard from serverside because client's memory belongs to the client. You must use javascript for this purpose and that's browser dependent.
- Here is a SO-link that'll help you to get started: how-to-copy-to-clipboard-in-javascript They recommend to use zeroclipboard, i have no experiences with it.
- Here is another SO-link with a simple example: how-to-actually-use-zeroclipboard-in-jquery
What you can do from serverside is to register a client script-block that will be executed on load of your webform to copy the text into clipboard as soon as possible.

Community
- 1
- 1

Tim Schmelter
- 450,073
- 74
- 686
- 939