Posted on: 2/9/2014 7:26:20 AM | Views : 909

Hi,
when i use below code in a nurmal button click or page load it's working properly..
ScriptManager.RegisterStartupScript(this, typeof(Page), new Random().Next(0, 9999999).ToString(), "alert('Some Text');", true); But if i use it like below: 
SqlDependency dep = new SqlDependency(sqlCommand); SqlDependency.Start("my_con_str"); dep.OnChange += new OnChangeEventHandler(dep_OnChange); void dep_OnChange(object sender, SqlNotificationEventArgs e) { ScriptManager.RegisterStartupScript(this, typeof(Page), new Random().Next(0, 9999999).ToString(), "alert('TEST');", true); } it doesn't work :( 
Note: And i'm pretty sure it's not about SqlDependency it's about events like onChange..
Any help would be appreciated. Thanks.

Go to the complete details ...