I can\'t set the value of a hidden field with jquery in asp .net.
My hidden field is declared like this:
Depending when you are reading the value on the server side, it might not be updated on the control yet - essentially if you are doing it in a change event handler, and the control that raises the change event gets updated before the hidden control, then calling hdnSelectedTicket.Value can still return the old value.
The easiest way to get around this issue is to cheat and get it straight from the Form collection:
var ticketId = Request.Form[hdnSelectedTicket.UniqueID];