Jquery Hidden Field
Because jQuery knows nothing about asp:HiddenField. It looks in the HTML structure where you have <input type=”hidden” name=”ctl00$cph_main$HiddenFieldServerDateTime” id=”ctl00_cph_main_HiddenFieldServerDateTime” …. So there’s no input with ID= HiddenFieldServerDateTime. There are a few ways to overcome this: Use a css selector: <asp:HiddenField ID=”HiddenFieldServerDateTime” runat=”server” CssClass=”SomeStyle” /> with the following selector: var serverDateTime = $(“.SomeStyle”).val(); CssClass is not … Read more