Hello, has anyone come across a problem with clientclipboard extension, it’s giving an error message showing in the attached screenshot image and below is the code I’ve used to read text from clipboard.
Async Sub Get_ClipboardString()
Try
Me.Focus()
Dim data = Await ClientClipboard.ReadTextAsync()
Catch ex As Exception
AlertBox.Show(“Error on Copying String”)
End Try
End Sub
ClientClipboard uses the browsers clipboard api and there is no way around it.
You can try Clipboard.SetClientText(text). See docs. Uses the only possible alternative through the old execute api. There is no other way.
api/wisej.web/general/wisej.web.clipboard
Thank you for your quick response.
I’ve replicated the same code in another sample application and it’s working fine but I’m still having issues in the main application, so I will keep looking at or might find an alternative way to paste strings.
Hi Shabaz,
please check these 3 points. If still not clear please send a runnable test case that shows the issue:
Clipboard access requires user interaction (e.g., a button click).
The method is called outside an event handler (like Load, Timer, Async Sub without user input).
Your site isn’t served from a secure context (HTTPS) — required by most browsers for clipboard access.
Best regards
Frank
Please login first to submit.
