Context: See original thread
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=294673 Question:
I simplified original code to the bare minimum and still below Code 1 did not work as expected. I used .NET Framework 1.0.3705. Can you some of you conduct the test by just creating one aspx with either Code 1 or Code 2 and tell us what's happening here.
1. Code 1: *DID NOT* get to the page google. It get to http://www.asp.net.
Phuoc
Participant
1150 Points
230 Posts
Catch me if you can? by try/catch/response.redirect. Need expert to explain.
Jul 30, 2003 11:06 PM|LINK
private void Page_Load(object sender, System.EventArgs e) { try { Response.Redirect("http://www.google.com"); } catch (Exception ex) { Response.Redirect("http://www.asp.net"); } }2. Code 2: get to the page google if we commented out //Response.Redirect("http://www.asp.net");private void Page_Load(object sender, System.EventArgs e) { try { Response.Redirect("http://www.google.com"); } catch (Exception ex) { //Response.Redirect("http://www.asp.net"); } }and where there is a team, there is more than one way.