Hi:
I've seen the use of the following to trigger a javascript after server-side callback with AjaxManager:
AjaxManager1.ResponseScripts.Add("alert('Hi')");
However, it seems like that I have to also rewrite the entire javascript out on the server side and place it within the Add(). This is somewhat inconvenient if the javascript is long and complex (e.g.: 100 lines).
In fact, I already have the javascript written inside the aspx page (e.g.: myFunction()) . Is there a way to just call/trigger myFunction() using AjaxManager1.ResponseScripts directly without having to rewrite the entire block of codes out again on the server side?
Thanks in advance for your help.
I've seen the use of the following to trigger a javascript after server-side callback with AjaxManager:
AjaxManager1.ResponseScripts.Add("alert('Hi')");
However, it seems like that I have to also rewrite the entire javascript out on the server side and place it within the Add(). This is somewhat inconvenient if the javascript is long and complex (e.g.: 100 lines).
In fact, I already have the javascript written inside the aspx page (e.g.: myFunction()) . Is there a way to just call/trigger myFunction() using AjaxManager1.ResponseScripts directly without having to rewrite the entire block of codes out again on the server side?
Thanks in advance for your help.