Trying to utilize the insert functionality of an aspx DetailsView, I am looking to display a javascript modal popup window while a new record is being processed and added to the database. Despite my efforts to trigger the popup using DetailsView_ItemCommand upon button click, it does not seem to be working. To troubleshoot, I attempted to display a simple Alert() popup using the following code snippet:
protected void DetailsViewInsertFPL_ItemCommand(object sender, DetailsViewCommandEventArgs e)
{
if (e.CommandName == "Insert")
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "waitMessage", "alert('Please wait while your request is processed');", true);
return;
}
}
Upon successful insertion of the record, there is a redirect to another aspx page.
I am seeking guidance on how to resolve this issue. My next step involves examining the properties of the aspx page and DetailsView in order to identify any potential misconfigurations.