I have some script in javascript file call myjavascript.js and I want to get the content of asp:Label on my page. inside the head of my page i have linked the javascript file to the page. but am not able to reference the asp:Label om my page in myjavascript.js file. please help below is my code
//on my HTML page
<head>
<script type="text/javascript" src="myjavascript.js"></script>
</head>
//in the myjavascript.js file
var totalamounttopay = document.getElementById('<%=Me.lblfinalgrosstotal.ClientID%>').innerText;