G
Guest
Hi, I have an ASP.NET solution, and the ASPX page I have a form , I want to
copy some of the data from that form to the clipboard, I am using the below
script the script works fine when I use a normal anchor tag with the onclick
event, but I want to be able to use an actual asp control like the hylperlink
or linkbutton. I have tried the link button but it gives an error saying
Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'.
And the hyperlink control doesn't seem to have an option for the onclick. The
code is located in the .aspx not in the .vb. Thanks!
<script language="vbscript" type="text/VBScript">
sub CopyToClip
dim mytext
mytext = document.Form1.txtNote.Value
call window.clipboardData.setData("Text", mytext)
end sub
</script>
copy some of the data from that form to the clipboard, I am using the below
script the script works fine when I use a normal anchor tag with the onclick
event, but I want to be able to use an actual asp control like the hylperlink
or linkbutton. I have tried the link button but it gives an error saying
Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'.
And the hyperlink control doesn't seem to have an option for the onclick. The
code is located in the .aspx not in the .vb. Thanks!
<script language="vbscript" type="text/VBScript">
sub CopyToClip
dim mytext
mytext = document.Form1.txtNote.Value
call window.clipboardData.setData("Text", mytext)
end sub
</script>