I have a block of code in my C# that executes on a button click that looks like so:
protected void LoadButton(object sender, EventArgs e)
{
LoadDoc();
ReadXML();
ScriptManager.RegisterClientScriptBlock(loadXML, this.GetType(), "FormMath", "FirstCalculation();", true);
}
With that last line, I want to call a JS function called 'FirstCalculation'. The problem is that FirstCalculation exists not in the default.aspx file, but in an external js file that we'll call external.js. I can't (shouldn't) move FirstCalculation away from external.js, but I still need to call it on this one button click. Of course, I need to be able to call up some ASP as well.
The end goal is such that I'm able to call an ASP function and Javascript function in that order on a button click.
Also worth noting, I have no idea what the third argument is supposed to be in the RegisterClientScriptBlock call. I copied that from a different resource so if that needs to be something specific, that might be a thing to look at.
edit: A lot of the other examples I ran into seem to be referencing code that is inside the default.aspx page and that's where my hang up is, since this isn't in the same file.