ControllerBase.Redirect(String) Method

Definition

Creates a RedirectResult object that redirects (Status302Found) to the specified url.

public:
 virtual Microsoft::AspNetCore::Mvc::RedirectResult ^ Redirect(System::String ^ url);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.RedirectResult Redirect (string url);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Redirect : string -> Microsoft.AspNetCore.Mvc.RedirectResult
override this.Redirect : string -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Overridable Function Redirect (url As String) As RedirectResult

Parameters

url
String

The URL to redirect to.

Returns

RedirectResult

The created RedirectResult for the response.

Attributes

Applies to