How to pass variable from jquery to code behind (C#)?
问题 Here is my code, but it doesn't work (code behind gets empty string): ` <head id="Head1" runat="server"> <title>Pass Javascript Variables to Server</title> <script type="text/javascript"> // Second Step function f() { $("[id$='inpHide']").val("My JavaScript Value"); } </script> </head> <body onload="SetHiddenVariable()"> <form id="form1" runat="server"> <div> <input id="inpHide" type="hidden" runat="server" /> <asp:Button ID="btnJSValue" Text="Click" runat="server" OnClientClick="f"/> <asp