This part give me a error something like this,
Object reference not set to an instance of an object.
here is the my code which raised when any changes happen on sql server.
private void dependency_OnDataChangedDelegate(object sender, SqlNotificationEventArgs e)
{
System.Web.HttpContext.Current.Response.Redirect("Default.aspx");//raised error here
SqlDependency dependency = sender as SqlDependency;
dependency.OnChange -= new OnChangeEventHandler(dependency_OnDataChangedDelegate);
}
when I chech it with breakpoint,It can reach inside the dependency_OnDataChangedDelegate but give me exception.