PageModel.NotFound 方法

定义

重载

NotFound()

创建一个 NotFoundResult 生成响应的 Status404NotFound

NotFound(Object)

创建一个 NotFoundObjectResult 生成响应的 Status404NotFound

NotFound()

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

创建一个 NotFoundResult 生成响应的 Status404NotFound

public:
 virtual Microsoft::AspNetCore::Mvc::NotFoundResult ^ NotFound();
public virtual Microsoft.AspNetCore.Mvc.NotFoundResult NotFound ();
abstract member NotFound : unit -> Microsoft.AspNetCore.Mvc.NotFoundResult
override this.NotFound : unit -> Microsoft.AspNetCore.Mvc.NotFoundResult
Public Overridable Function NotFound () As NotFoundResult

返回

为响应创建的 NotFoundResult

适用于

NotFound(Object)

Source:
PageModel.cs
Source:
PageModel.cs
Source:
PageModel.cs

创建一个 NotFoundObjectResult 生成响应的 Status404NotFound

public:
 virtual Microsoft::AspNetCore::Mvc::NotFoundObjectResult ^ NotFound(System::Object ^ value);
public virtual Microsoft.AspNetCore.Mvc.NotFoundObjectResult NotFound (object value);
abstract member NotFound : obj -> Microsoft.AspNetCore.Mvc.NotFoundObjectResult
override this.NotFound : obj -> Microsoft.AspNetCore.Mvc.NotFoundObjectResult
Public Overridable Function NotFound (value As Object) As NotFoundObjectResult

参数

value
Object

返回

为响应创建的 NotFoundObjectResult

适用于