asp.net - Find asp hiddenfield in jquery script file -


i had hidden field this

<asp:hiddenfield id="hfprdid" value="hooray" runat="server" /> 

and trying acces value jquery file this

alert($("#'<%=hfprdid.clientid %>'").value); 

but throws error this

error: error: syntax error, unrecognized expression: #'<%=hfprdid.clientid %>' 

try:

alert($("#<%= hfprdid.clientid %>").val()); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -