I have an aspx page contining a hiddenfield
<asp:HiddenField ID="hdnObjectID" runat="server" />
I want to get the value of hiddenfield in external javascript file.
I have used this code to get the value of hdnObjectID
var objectID = parseInt($('#' + '<%= hdnObjectID.ClientID %>')[0].value);
But its not getting the value.
Try the following in your Javascript:
var objectID = parseInt(document.getElementById(‘hdnObjectID’).value);