I am using the new Razor Pages in ASP.Net core 2
Now I need to redirect
I tried this, but the page does not redirect:
public class IndexModel : PageModel
{
public void OnGet()
{
string url = "/.auth/login/aad?post_login_redirect_url=" + Request.Query["redirect_url"];
Redirect(url);
}
}
How to redirect?