I want to dynamically call a javascript funcition with an asp.net button. Basically my code looks like this
Code:
private void AddCategory_Click(object sender, System.EventArgs e)
{
Response.Write("<script>MyFunc()</script>");
}
This would work fine if it werent for the fact the function is stored in a
js file, which isin't referenced until after this call is made, causing an error. How can I output this at the end of the response stream, or using some kind of event, or even call a
js function at the begging of a page? Any ideas?!
Thanks!
-- jenni