Problem calling RegisterStartupScript
I'm calling the RegisterStartupScript in the RowUpdate event as shown below.
I wanted the result of the confirmation message based on that, the changes will be saved into the database.
Thanks in advance
protected void GridView1_RowUpdated(object sender, GridViewUpdatedEventArgs e)
if (e.Exception != null)
string x = e.Exception.Message;
Page.ClientScript.RegisterStartupScript(this.GetType(), "IsValid", "alert('" + x + "');", true);
myStringVariable = "Ok";
Page.ClientScript.RegisterStartupScript(this.GetType(), "IsValid", "alert('" + myStringVariable + "');", true);
This topic is now closed. New replies are no longer allowed.