Hi, all!
I've been trying to pass a javascript variable to an asp.net webapp through a hidden input field.
All according to post http://www.daniweb.com/techtalkforums/thread26184.html.
But something seems to be garbled.
Here's what parts of my aspx code looks like.
...
var src = document.documentElement.outerHTML;
document.getElementById("pSource").Value = src;
}
</script>
</head>
<body>
<form runat="server">
<input id="pSource" type="hidden" />
...
Somehow the line document.getElementById("pSource").Value = src;
doesn't work.
I've tried with <input id="pSource" type="hidden" runat="server" />
as well.
The javascript code is in a window.onload function.
What I want to do is to have the content of the hidden field mailed as html from CodeBehind.
Any suggestions?