I have prob in before Response.Redirect while executing the code.
When i'm clicking button event, the below code has been executed. But The code before "Response.Redirect" doesn't execute, It just redirect the page.
Code: -
Application.Lock();
DataTable dt3 = new DataTable();
dt3 = (DataTable) Application["Online_User_List"];
string sCond = string.Format("Count_No = '" + Session["Count_No"].ToString() + "'");
DataRow[] drArray = dt3.Select(sCond);
foreach (DataRow dr in drArray)
{
dt3.Rows.Remove(dr);
dt3.AcceptChanges();
}
Application["Online_User_List"] = dt3;
Application["ImpactUsers"] = (int)Application["ImpactUsers"] - 1;
//Page.ClientScript.RegisterStartupScript(this.GetType(), "MessageThenRedirect", "alert('" + Session["Count_No"].ToString() + "');", true);
// DB.ExeAUD("delete from betasys.temp_tb_session_mst t where t.s_no = '" + Session["Count_No"].ToString() + "'");
Application.UnLock();
Session.Abandon();
Session.Clear();
System.Threading.Thread.Sleep(3000);
Response.Redirect("Login.aspx");
Thanks in Advance

suren vPosted Mar 10, 2014, 3:31 AM
When,I'm using for thread.sleep() in before of Respose.Redirect() b'coz it will directly goes to redirect the page that's i give thread.spleep options. Do u have any other ideas. Please let me.
Thanks For Your Reply :)
Lakshmanan Sethu SankaranarayanPosted Mar 8, 2014, 10:18 AM