Response.Redirect in Page_Load

asp.net, response.redirect

Solution

Use

Response.Redirect("http://www.mysite.com",  false)

second parameter Indicates whether execution of the current page should terminate or not.

if you use `Response.Redirect("http://www.mysite.com")`, current page execution will terminate

Problem

I have a `Response.Redirect` in my `Page_Load`: ``` Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load ...Code Response.Redirect("http://www.mysite.com") End Sub ``` I have other Subroutines with working code before adding the Response.Redirect When the `Response.Redirect` is added they all do not process their code and automatically execute the `Response.Redirect` website. My code works when there is no `Response.Redirect`.

Original source