Search code examples
asp.netjqueryhidden-field

how to fill asp.net hidden field with Jquery


im trying this format:

$("#<%= hfWidth.UniqueID %>").val($("#drag").attr("offsetWidth"));

to fill the hidden field with client-side values

but when I do postback, the values doesn't seem to be saved.

help


Solution

  • fixed it with <%= hfWidth.ClientID %>