all groups > vb.net > march 2006 >
You're in the

vb.net

group:

HELP! How to pass a javascript value to asp.net?


HELP! How to pass a javascript value to asp.net? Dav
3/24/2006 5:40:26 PM
vb.net: I am sure that I should be able to send a javascript value (client
side) to a asp.net form via a hidden field. I have seen post where
people say it can be donw but they never post there code.

Please post a complete example (or a link to an example) on how to do
this.

I appreciate your help!

Thanks!
Re: HELP! How to pass a javascript value to asp.net? Dav
3/24/2006 6:05:33 PM
Never mind, I figured it out. Here it is for the next person:

<script>
document.Form1.oHidden.value = "SomeValue";
</scrpit>

<form id="Form1" method="post" runat="server">
<input type=hidden id="oHidden" NAME="oHidden">
<asp:Button Runat=server Text=submit ID="Button1"></asp:Button>
</form>
AddThis Social Bookmark Button