J
Jaez
As a newbie to javascript and asp.net 2 I have come across a problem related
to the windows clipboard.
I have written an application in vb6 which collects data and puts it on the
user's clipboard in windows. On leaving that application it opens my webpage
in IE6 or 7. The page displays a text box and the user is required to paste
the clipboard into the text box.
I read about window.clipboardData.getData('Text') and it seems an idea way
of pasting the contents of the clipboard straight into the text box during
webpage load.
My problem is that my pages are written in asp.net 2 (VB style) and I have
failed in all attempts to get the clipboard to paste to an asp.net textbox.
I realise that its a job for javascript on the client side.
What i need is something like
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
textbox2.text=window.clipboardData.getData("Text");
End Sub
I have also tried
response.write("<script
type='text/javascript'>textbox2.text=window.clipboardData.getData('Text')</script>");
I rather suspect that I need to make a jasvascript function but have no idea
how to make a function that returns a variable that can be picked up in
asp.net during form load
All help appreciated
Jaez
to the windows clipboard.
I have written an application in vb6 which collects data and puts it on the
user's clipboard in windows. On leaving that application it opens my webpage
in IE6 or 7. The page displays a text box and the user is required to paste
the clipboard into the text box.
I read about window.clipboardData.getData('Text') and it seems an idea way
of pasting the contents of the clipboard straight into the text box during
webpage load.
My problem is that my pages are written in asp.net 2 (VB style) and I have
failed in all attempts to get the clipboard to paste to an asp.net textbox.
I realise that its a job for javascript on the client side.
What i need is something like
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
textbox2.text=window.clipboardData.getData("Text");
End Sub
I have also tried
response.write("<script
type='text/javascript'>textbox2.text=window.clipboardData.getData('Text')</script>");
I rather suspect that I need to make a jasvascript function but have no idea
how to make a function that returns a variable that can be picked up in
asp.net during form load
All help appreciated
Jaez