I have a javascript function in the External JS File. I want to call it from the co0de behind. How can I do that ?
I read somewhere that I can do from ScriptManager.RegisterStartupScript but how, can anyone explain me.
JS File:
Function1()
{
alert("came");
//Some More logic
}
Update
Calling from
//Tried this But NOT WORKING
protected void Page_PreRender(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(this, GetType(), "Function1", "Function1();", true);
Page.ClientScript.RegisterStartupScript(GetType(), "Function1", "Function1()", true);
}