Yesterday we covered issues surrounding using ASP.NET’s Response.Redirect in server side code. We noted that not handing it correctly could prevent code from running on the server that we want to run.
Take this code as an example:
Once again, we need to think more clearly about what we’ve actually written.
What we’ve actually told the server to do is the following:
- Set the header (not the header element, but the header that tells the browser whether the code executed successfully or not) to “302 redirect.”