2010-01-12 8 views

Antwort

15
void ProcessRequest(HttpContext context) 
{ 
    context.Response.Redirect(newUrl); 
} 
0

Verwendung context.Response.Redirect (newUrl); Ergebnisse in einer Seite, die besagt:

"Objekt verschoben zu here."

Update: Dies passiert, weil ich mich abgemeldet habe, in diesem Fall ist die Antwort FormsAuthentication.RedirectToLoginPage();

-1

fand ich eine Lösung, und es sollte funktionieren:

context.Response.ContentType = "text/plain"; 

if (controlcase) 
{ 
    //Write code, what you want... 

    context.Response.Write("This is result"); 
} 
else 
{ 
    context.Response.Write("<script>location.href='url you want to redirect'</script>"); 
}