How can I iterate through each of these hidden fields and change each one's value with JQuery?
<asp:HiddenField ID="field1" runat="server"/>
<asp:HiddenField ID="field2" runat="server"/>
<asp:HiddenField ID="field3" runat="server"/>
How can I iterate through each of these hidden fields and change each one's value with JQuery?
<asp:HiddenField ID="field1" runat="server"/>
<asp:HiddenField ID="field2" runat="server"/>
<asp:HiddenField ID="field3" runat="server"/>
You can do it by combining
:hiddenselector andattribute starts withselector,DEMO
To make sure that the ID not change use also the
ClientIDMode="Static"on each control. The ID can change if you place that code on any page that use any master page, or is inside any custom control. So your control must be: