you can say Response.Redirect("home.aspx", false); and it will not stop the request.
but it will continue to be executed. so when using Response.Redirect("home.aspx", false);
If you pass false, you will not receive an error, but will not complete the request
correct me if I am wrong. But code like this
public void Btn_Click() { if(count == 0) { Response.Redirect("OutOfStock.aspx", false); } Prospect.Save(-1, purchaceDate); }
Even if count == 0
Prospect.Save(-1, purchaceDate);
will always work. And keep a new perspective when you can expect it to stop running
source share