i'm working in a webform page and i want to pass data from the "Client-Side" (ASPX) a value returned by jquery event to the "code behind" (ASPX.CS).
Thanks.
i'm working in a webform page and i want to pass data from the "Client-Side" (ASPX) a value returned by jquery event to the "code behind" (ASPX.CS).
Thanks.
You can save the value in a hidden field and access to it from the server:
or
Set value of hidden field in a form using jQuery's ".val()" doesn't work
Just set the value to an input field like normal. When the page posts to the code behind, the value will be resident.
Example
HTML Markup:
<asp:Textbox id="myTextbox" runat="server" ClientIDMode="Static"/>
jQuery:
$('#myTextbox').val('myVal');
Again, when the form is posted, the value will be sent..