Hi "Newbie",
"Newbie" <ne****@coding.hellopeepsschrieb im Newsbeitrag
news:ei**************@TK2MSFTNGP04.phx.gbl...
Thanks for your reply but its not what I want at all
If you have a asp label with some text in it
I want to be able to click a link or a button to send that label's text to
the clipboard, that's all
MVP's should't reply with useless links, as I am looking for 1) VB.NET
server side code or 2) javascript that runs off a server control
You don't need VB.NET server-side code for this because server-side cannot
copy text to the clipboard, that is the reason for the link where you will
find the JavaScript source code you need for this action. But here is the
VB.NET code if you have a label called Label1 and a button called Button1:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Button1.OnClientClick =
"window.clipboardData.setData('Text',document.getE lementById('" + _
Label1.ID + "').innerHTML);"
End Sub
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/ http://www.ajaxpro.info/
>
"Michael Schwarz" <no****@schwarz-interactive.dewrote in message
news:ez**************@TK2MSFTNGP02.phx.gbl...
>Hi,
you can do this with JavaScript i.e.:
http://www.codeproject.com/jscript/CopyasHTML.asp
But notice that this is only working in Internet Explorer.
--
Best regards | Schöne Grüße
Michael
Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer
http://weblogs.asp.net/mschwarz/
http://www.ajaxpro.info/
"Newbie" <ne****@coding.hellopeepsschrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi Group!
I am using asp.net 1.1 with vb.net 2003
In an asp.net page I click a button to return a result
I would like to add a button or link that selects the entire result of
the
lblResult control text & copies it to the clipboard
How do I do this
TIA
ASP.NET Newbie