RedirectResult Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RedirectResult(String) |
Initializes a new instance of the RedirectResult class with the values provided. |
RedirectResult(String, Boolean) |
Initializes a new instance of the RedirectResult class with the values provided. |
RedirectResult(String, Boolean, Boolean) |
Initializes a new instance of the RedirectResult class with the values provided. |
RedirectResult(String)
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
Initializes a new instance of the RedirectResult class with the values provided.
public:
RedirectResult(System::String ^ url);
public RedirectResult (string url);
new Microsoft.AspNetCore.Mvc.RedirectResult : string -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Sub New (url As String)
Parameters
- url
- String
The local URL to redirect to.
Applies to
RedirectResult(String, Boolean)
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
Initializes a new instance of the RedirectResult class with the values provided.
public:
RedirectResult(System::String ^ url, bool permanent);
public RedirectResult (string url, bool permanent);
new Microsoft.AspNetCore.Mvc.RedirectResult : string * bool -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Sub New (url As String, permanent As Boolean)
Parameters
- url
- String
The URL to redirect to.
- permanent
- Boolean
Specifies whether the redirect should be permanent (301) or temporary (302).
Applies to
RedirectResult(String, Boolean, Boolean)
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
- Source:
- RedirectResult.cs
Initializes a new instance of the RedirectResult class with the values provided.
public:
RedirectResult(System::String ^ url, bool permanent, bool preserveMethod);
public RedirectResult (string url, bool permanent, bool preserveMethod);
new Microsoft.AspNetCore.Mvc.RedirectResult : string * bool * bool -> Microsoft.AspNetCore.Mvc.RedirectResult
Public Sub New (url As String, permanent As Boolean, preserveMethod As Boolean)
Parameters
- url
- String
The URL to redirect to.
- permanent
- Boolean
Specifies whether the redirect should be permanent (301) or temporary (302).
- preserveMethod
- Boolean
If set to true, make the temporary redirect (307) or permanent redirect (308) preserve the initial request method.