If you would like to do it server side which your code post suggests, try HttpContext.Current.Response.Redirect('your url');