I use below code for call javascript's function from code behind but doesn't call function
//C#
Page.ClientScript.RegisterStartupScript(this.GetType(), "close panel", "CloseFunction()", true);
//javascript
function CloseFunction() {
alert("call");
}
It should be true.
Page.ClientScript.RegisterStartupScript(this.GetType(), "close panel", "CloseFunction()",
true);
Update Link:
ClientScriptManager.RegisterStartupScript Method
a Boolean value indicating whether to add script tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With