I have a function tied to ClientScript.RegisterOnSubmitStatement that displays a JQuery UI dialog while an UpdatePanel is updating (it takes a while to update). There are 2 buttons on the page, and I'd like to display different text in the dialog depending on which button is clicked. Is there a way to do something like this:
ServerSide
ClientScript.RegisterOnSubmitStatement(this.GetType(), "ShowSplashScreen", "ShowSplashScreen(this)");
ClientSide
function ShowSplashScreen(source) {
// Do stuff depending on the button that was clicked
}
Currently, the "source" is the DOM window, not the button.
You can use the
__EVENTTARGETto find the control that initiated the postback: