TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
suren v
NA
113
44.1k
Code Before Response.Redirect doesn't Execute ?
Mar 8 2014 7:15 AM
Hai Friends,
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
Reply
Answers (
2
)
table row count problem
SqlException :Error converting data type nvarchar to int