Relegence
asked on
Retrieving clipboard data
Hello,
I am writing a c# asp.net application.
I have a div and 2 buttons - an html "Paste" button and an ASP "Submit" button.
When pressing the "Paste" button I am putting the text from the clipboard to the div using:
var text = clipboardData.getData("Tex t");
document.all("divData").in nerHTML = text;
The problem is that when pressing the server side "Submit' button, I want to use the div's data. Instead of returning the data I just pasted from the clipboard, I get the data that was in the div previously.
I guess it is because the "Paste" function occurred on the client and the server doesn't know the data has changed.
How can I "Paste" data from the clipboard and use it in my "Submit" function?
Thank you
I am writing a c# asp.net application.
I have a div and 2 buttons - an html "Paste" button and an ASP "Submit" button.
When pressing the "Paste" button I am putting the text from the clipboard to the div using:
var text = clipboardData.getData("Tex
document.all("divData").in
The problem is that when pressing the server side "Submit' button, I want to use the div's data. Instead of returning the data I just pasted from the clipboard, I get the data that was in the div previously.
I guess it is because the "Paste" function occurred on the client and the server doesn't know the data has changed.
How can I "Paste" data from the clipboard and use it in my "Submit" function?
Thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've notice this was posted almost a year ago, but i tried the code, my divData.InnerHtml is bringing nothing. Also, the asp:hiddenfield is giving error, do you think this is .net version issue? i'm using 1.1
is there any other solution to read the innerHTML of div object?
thank you
Seb