110,577
社区成员
发帖
与我相关
我的任务
分享
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Response.Redirect("A.aspx",false);
}
catch( Exception e1)
{
Response.Redirect("B.aspx");
//Response.Write(" <script>alert('aaaaaaaaaaaa') </script");
}
}
bool hasException = false;
try
{
hasException = false;
//Response.Redirect("A.aspx");
}
catch( Exception e1)
{
hasException = true;
//Response.Redirect("B.aspx");
//Response.Write(" <script>alert('aaaaaaaaaaaa') </script");
}
finally
{
if(hasException )
{
Response.Redirect("B.aspx");
}
else
{
Response.Redirect("A.aspx");
}
}