I am trying to copy the text from a textbox to the clipboard. I saw some
code posted earlier for Pasting from the clipboard so I modified it for copy
but it is not working (see code below). When I click on the
btnCopyToClipboard I can see some processing going on but the text from the
textbox is not being put on the clipboard?
Thoughts or suggestions?
Wayne
====================================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
btnCopyToClipboard.Attributes.Add("onclick", "CopyIt();return false;")
Page.RegisterClientScriptBlock("copyroutine", _
"<script>function CopyIt()" & _
"{document.all.txtHidden.focus();" & _
"document.execCommand('copy');}</script>")
End If
End Sub