User944339287 posted
Hi guys.. i wanna call javascript function which placed at Master Page from Content Page but failed.
Below is my code. Please correct me. TQ
Master Page (HTML)
<head>
<script>
function openNav() {
document.getElementById("mySidenav").style.width = "350px";
}
</script>
</head>
<body>
<span style="cursor: pointer" onclick="openNav()">Open</span>
</body>
Content Page (Code Behind)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack = False Then
Page.ClientScript.RegisterStartupScript([GetType](), "CallFunction", "openNav()", True)
End If
End Sub