Call Javascript method code behind

Alron

New Member
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:\[code\] Page.ClientScript.RegisterStartupScript(GetType(), "MyFunction", "MyFunction();", true);\[/code\]javascript:\[code\] <script type ="text/javascript" language="javascript"> function MyFunction() { document.getElementById("Label8").style.display = 'none'; } </script>\[/code\]Pls let me know if there is any mistake. Looks like control is not going to method definition only.Thank you
 
Back
Top