以下是我的代码:
try
{
Session["CuponeNO"] = txtCode.Text;
txtCode.Text = string.Empty;
Response.Redirect("~/Membership/UserRegistration.aspx");
}
catch(Exception ex)
{
string s = ex.ToString();
lblMessage1.Text = "Error Occured!";
}
即使它在捕获后重定向,我仍然遇到错误。
这是错误信息:
"System.Threading.ThreadAbortException: Thread was being aborted.\r\n at System.Threading.Thread.AbortInternal()\r\n at System.Threading.Thread.Abort(Object stateInfo)\r\n at System.Web.HttpResponse.End()\r\n at System.Web.HttpResponse.Redirect(String url, Boolean endResponse)\r\n at System.Web.HttpResponse.Redirect(String url)\r\n
请问有人能告诉我为什么会出现这个错误吗?
:/
- user456814