Afternoon,
I have been able to call JavaScript functions from my C# before and it worked fine. For some reason this time the function is not getting hit when i breakpoint the code.
So this is my C# method.
public void tester()
{
string returnResult = HttpContext.Current.Session["result"].ToString();
Page.ClientScript.RegisterStartupScript(this.GetType(), "alerify", "alerify('" + returnResult + "');", true);
//ScriptManager.RegisterStartupScript(this, this.GetType(), "alerify", "alerify(" + returnResult + ");", true);
}
You can see that i have tried different methods but the function is still not getting hit.
This is the JavaScript function i want to call.
function alerify(e) {
alert(e);
if (e == "InvalidDates") {
alertify.error("gfgsdggfsdgfsdfd");
}
}
I am thinking that i am missing somthing but i just don't know what.