I want to call a javascript function from the code-behind file – but not after the user clicked something. The call will take place when a condition is true.
Is there a simple way to do this?
Edit:
I have now “fixed” it with querystring values, and putting ClientScript.IsStartupScriptRegistered in Page_Load…but I wish there could be a neater way.
You can use Page.RegisterClientScriptBlock(now ClientScriptManager.RegisterStartupScript Method) or Page.RegisterStartupScript (now ClientScriptManager.RegisterClientScriptBlock). But, that depends on what you are actually trying to accomplish.