Behavior for server.transfer and response.redirect in try-catch-finally block
Code-1:
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Web_Test
{
public partial class WebForm : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
try
Response.Redirect("Page1.aspx");
}
catch
Response.Redirect("Page2.aspx");
finally
Response.Redirect("Page3.aspx");
Code-2
Server.Transfer("Page1.aspx");
Server.Transfer("Page2.aspx");
Server.Transfer("Page3.aspx");