I have a function in Javascript which makes a label invisible. I want to call this function from the code behind. I am not able to make it invisible. Here are both the lines of code.
C# code behind:
Page.ClientScript.RegisterStartupScript(GetType(), "MyFunction", "MyFunction();", true);
javascript:
<script type ="text/javascript" language="javascript">
function MyFunction()
{
document.getElementById("Label8").style.display = 'none';
}
</script>
Pls let me know if there is any mistake. Looks like control is not going to method definition only.
Thank you