By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,569 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,569 IT Pros & Developers. It's quick & easy.

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

P: n/a
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!

Mar 25 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Dav
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>

Mar 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.