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 ofGridView. I registered using ScriptManager.RegisterStartupScript. GridView is inside anUpdatePanel 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.
I have tried many solutions available on Internet but nothing working for me. Also, When page is partially loaded I am not registering the script again as it has been already registered. For firefox I have tried by registering the script on partial postback too but no luck. This is how I am registering:
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.