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

  • Thread starter Thread starter Dav
  • Start date Start date
D

Dav

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!
 
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top