Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ClipBoard

Status
Not open for further replies.

JDAEMS

Programmer
Aug 27, 2003
84
BE
Dear Sir/Madam,

I have a linkbutton on my page called "Paste". As you can see from the name, the idea is to paste something from the clipboard.

I would like to set the pasted value to an existing session variable. How can I accomplish this?

I am not sure, but I balieve pasting from the clipboard is only possible in javaScript and the session variable only exists in the visual basic script, so how can I set one value equal to the other? Is this possible?

thank you for your help

kind regards
Jelle
 
I have found this on the internet, but my application does not recognize the iDataObject. Should I import something or is there another way?

Public Function GetClipboardText() As String
Dim objClipboard As IDataObject = Clipboard.GetDataObject()
With objClipboard
If .GetDataPresent(DataFormats.Text) Then Return _
.GetData(DataFormats.Text)
End With
End Function
 
hi,

in your VBScript code, create a variable to hold the session value and send it out as a javascript variable. now you can access the value in the browser...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top