PageBase.StatusCode Method
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
StatusCode(Int32) |
Creates a StatusCodeResult object by specifying a |
StatusCode(Int32, Object) |
Creates a ObjectResult object by specifying a |
StatusCode(Int32)
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a StatusCodeResult object by specifying a statusCode
.
public:
virtual Microsoft::AspNetCore::Mvc::StatusCodeResult ^ StatusCode(int statusCode);
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (int statusCode);
abstract member StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
override this.StatusCode : int -> Microsoft.AspNetCore.Mvc.StatusCodeResult
Public Overridable Function StatusCode (statusCode As Integer) As StatusCodeResult
Parameters
- statusCode
- Int32
The status code to set on the response.
Returns
The created StatusCodeResult object for the response.
Applies to
StatusCode(Int32, Object)
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a ObjectResult object by specifying a statusCode
and value
public:
virtual Microsoft::AspNetCore::Mvc::ObjectResult ^ StatusCode(int statusCode, System::Object ^ value);
public virtual Microsoft.AspNetCore.Mvc.ObjectResult StatusCode (int statusCode, object value);
abstract member StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
override this.StatusCode : int * obj -> Microsoft.AspNetCore.Mvc.ObjectResult
Public Overridable Function StatusCode (statusCode As Integer, value As Object) As ObjectResult
Parameters
- statusCode
- Int32
The status code to set on the response.
- value
- Object
The value to set on the ObjectResult.
Returns
The created ObjectResult object for the response.