I am facing very strange problem. I have tried many thing but could not get it solved. Here is the scenario.
I have a GridView with 40 records. I am registering a script in OnRowDataBound Event of GridView. I registered using ScriptManager.RegisterStartupScript. GridView is inside an UpdatePanel and UpdatePanel is refreshed after one minute.
When first time Page is loaded , My script works fine. But after Partial PostBack it stops working on FirFox. It is working on Chrome, IE, Safari and Opera. It is only FirFox which is creating problem.
ScriptManager scriptManager = ScriptManager.GetCurrent(this); if (scriptManager != null && !scriptManager.IsInAsyncPostBack) { ScriptManager.RegisterStartupScript(this.UpdatePanel5, this.UpdatePanel5.GetType(), e.Row.RowIndex.ToString(), "<script language='javascript' type='text/javascript'>alert('Error Message');</script>", false); // }
I have tried by changing the last argument of RegisterStartupScript to True and removing the script tag.
Any help will be highly appreciated.