拋出我有這樣的代碼異常的頁面重定向在asp.net
protected void Button_Click(object sender, EventArgs e)
{
try
{
// some code
con.Open();
string result = command.ExecuteScalar().ToString();
if (result != string.Empty)
{
// some code
Response.Redirect("Default.aspx");
}
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
finally
{
con.Close();
}
它提供了從Response.Redirect("Default.aspx");
前的異常:線程已被中止。
任何想法爲什麼?
感謝名單
這似乎是一個重複的問題結帳[這](http://stackoverflow.com/questions/2777105/response-redirect-causes-system-threading-threadabortexception) – 2013-03-14 16:28:58