LoginModel 类

定义

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public abstract class LoginModel : Microsoft.AspNetCore.Mvc.RazorPages.PageModel
[<Microsoft.AspNetCore.Authorization.AllowAnonymous>]
type LoginModel = class
    inherit PageModel
Public MustInherit Class LoginModel
Inherits PageModel
继承
LoginModel
属性

构造函数

LoginModel()

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

属性

ErrorMessage

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

ExternalLogins

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

HttpContext

获取 HttpContext

(继承自 PageModel)
Input

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

MetadataProvider

获取或设置 IModelMetadataProvider

(继承自 PageModel)
ModelState

获取 ModelStateDictionary

(继承自 PageModel)
PageContext

获取 PageContext

(继承自 PageModel)
Request

获取 HttpRequest

(继承自 PageModel)
Response

获取 HttpResponse

(继承自 PageModel)
ReturnUrl

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

RouteData

获取执行操作的 RouteData

(继承自 PageModel)
TempData

获取或设置 PageResult使用的 ITempDataDictionary

(继承自 PageModel)
Url

获取或设置 IUrlHelper

(继承自 PageModel)
User

获取与执行操作关联的用户的 ClaimsPrincipal

(继承自 PageModel)
ViewData

获取 ViewDataDictionary

(继承自 PageModel)

方法

BadRequest()

创建生成 Status400BadRequest 响应的 BadRequestResult

(继承自 PageModel)
BadRequest(ModelStateDictionary)

创建生成 Status400BadRequest 响应的 BadRequestObjectResult

(继承自 PageModel)
BadRequest(Object)

创建生成 Status400BadRequest 响应的 BadRequestObjectResult

(继承自 PageModel)
Challenge()

创建 ChallengeResult

(继承自 PageModel)
Challenge(AuthenticationProperties, String[])

使用指定的身份验证方案和 properties创建 ChallengeResult

(继承自 PageModel)
Challenge(AuthenticationProperties)

使用指定的 properties创建 ChallengeResult

(继承自 PageModel)
Challenge(String[])

使用指定的身份验证方案创建 ChallengeResult

(继承自 PageModel)
Content(String, MediaTypeHeaderValue)

通过指定 content 字符串和 contentType来创建具有 Status200OKContentResult 对象。

(继承自 PageModel)
Content(String, String, Encoding)

通过指定 content 字符串、contentTypecontentEncoding来创建具有 Status200OKContentResult 对象。

(继承自 PageModel)
Content(String, String)

通过指定 content 字符串和内容类型,创建具有 Status200OKContentResult 对象。

(继承自 PageModel)
Content(String)

通过指定 content 字符串创建具有 Status200OKContentResult 对象。

(继承自 PageModel)
File(Byte[], String, String)

返回具有指定 fileContents 作为内容(Status200OK)、指定 contentType 作为 Content-Type 的文件,并将指定的 fileDownloadName 作为建议的文件名。

(继承自 PageModel)
File(Byte[], String)

返回具有指定 fileContents 作为内容(Status200OK)和指定 contentType 作为内容类型的文件。

(继承自 PageModel)
File(Stream, String, String)

返回指定 fileStreamStatus200OK)中的文件,其中指定 contentType 为 Content-Type,指定的 fileDownloadName 为建议的文件名。

(继承自 PageModel)
File(Stream, String)

返回指定 fileStreamStatus200OK)中的文件,并将指定的 contentType 作为内容类型。

(继承自 PageModel)
File(String, String, String)

返回由 virtualPathStatus200OK)指定的文件,其中指定的 contentType 为 Content-Type,指定的 fileDownloadName 作为建议的文件名。

(继承自 PageModel)
File(String, String)

返回由 virtualPathStatus200OK)指定的文件,并将指定的 contentType 指定为 Content-Type。

(继承自 PageModel)
Forbid()

创建 ForbidResult(默认情况下Status403Forbidden)。

(继承自 PageModel)
Forbid(AuthenticationProperties, String[])

使用指定的身份验证方案和 properties创建一个 ForbidResult(默认Status403Forbidden)。

(继承自 PageModel)
Forbid(AuthenticationProperties)

使用指定的 properties创建一个 ForbidResult(默认Status403Forbidden)。

(继承自 PageModel)
Forbid(String[])

使用指定的身份验证方案创建 ForbidResult(默认Status403Forbidden)。

(继承自 PageModel)
LocalRedirect(String)

创建一个 LocalRedirectResult 对象,该对象将重定向Status302Found到指定的本地 localUrl

(继承自 PageModel)
LocalRedirectPermanent(String)

使用指定的 localUrl创建 Permanent 设置为 true(Status301MovedPermanently)的 LocalRedirectResult 对象。

(继承自 PageModel)
LocalRedirectPermanentPreserveMethod(String)

使用指定的 localUrl创建一个 LocalRedirectResult 对象,Permanent 设置为 true,PreserveMethod 设置为 true(Status308PermanentRedirect)。

(继承自 PageModel)
LocalRedirectPreserveMethod(String)

使用指定的 localUrl创建一个 LocalRedirectResult 对象,Permanent 设置为 false,PreserveMethod 设置为 true(Status307TemporaryRedirect)。

(继承自 PageModel)
NotFound()

创建生成 Status404NotFound 响应的 NotFoundResult

(继承自 PageModel)
NotFound(Object)

创建生成 Status404NotFound 响应的 NotFoundObjectResult

(继承自 PageModel)
OnGetAsync(String)

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

OnPageHandlerExecuted(PageHandlerExecutedContext)

在处理程序方法执行之后调用,然后执行操作结果。

(继承自 PageModel)
OnPageHandlerExecuting(PageHandlerExecutingContext)

在完成模型绑定后,在处理程序方法执行之前调用。

(继承自 PageModel)
OnPageHandlerExecutionAsync(PageHandlerExecutingContext, PageHandlerExecutionDelegate)

在模型绑定完成后,在调用处理程序方法之前异步调用。

(继承自 PageModel)
OnPageHandlerSelected(PageHandlerSelectedContext)

在选择处理程序方法之后调用,但在模型绑定发生之前调用。

(继承自 PageModel)
OnPageHandlerSelectionAsync(PageHandlerSelectedContext)

在选择处理程序方法之后,但在模型绑定发生之前以异步方式调用。

(继承自 PageModel)
OnPostAsync(String)

此 API 支持 ASP.NET 核心标识默认 UI 基础结构,不应直接从代码使用。 此 API 可能会在将来的版本中更改或删除。

Page()

创建呈现页面的 PageResult 对象。

(继承自 PageModel)
Partial(String, Object)

通过指定要呈现的部分的名称和模型对象来创建 PartialViewResult

(继承自 PageModel)
Partial(String)

通过指定要呈现的部分的名称来创建 PartialViewResult

(继承自 PageModel)
PhysicalFile(String, String, String)

返回由 physicalPathStatus200OK)指定的文件,其中指定的 contentType 为 Content-Type,指定的 fileDownloadName 作为建议的文件名。

(继承自 PageModel)
PhysicalFile(String, String)

返回由 physicalPathStatus200OK)指定的文件,并将指定的 contentType 指定为 Content-Type。

(继承自 PageModel)
Redirect(String)

创建一个 RedirectResult 对象,该对象将重定向到指定的 urlStatus302Found)。

(继承自 PageModel)
RedirectPermanent(String)

使用指定的 url创建 Permanent 设置为 true(Status301MovedPermanently)的 RedirectResult 对象。

(继承自 PageModel)
RedirectPermanentPreserveMethod(String)

使用指定的 url创建一个 RedirectResult 对象,Permanent 设置为 true,PreserveMethod 设置为 true(Status308PermanentRedirect)。

(继承自 PageModel)
RedirectPreserveMethod(String)

使用指定的 url创建一个 RedirectResult 对象,Permanent 设置为 false,PreserveMethod 设置为 true(Status307TemporaryRedirect)。

(继承自 PageModel)
RedirectToAction(String, Object)

使用 actionNamerouteValues将 (Status302Found) 重定向到指定操作。

(继承自 PageModel)
RedirectToAction(String, String, Object, String)

使用指定的 actionNamecontrollerNamerouteValuesfragment将指定操作重定向(Status302Found)。

(继承自 PageModel)
RedirectToAction(String, String, Object)

使用指定的 actionNamecontrollerNamerouteValues将指定的操作重定向(Status302Found)。

(继承自 PageModel)
RedirectToAction(String, String, String)

使用指定的 actionNamecontrollerNamefragment将指定的操作重定向(Status302Found)。

(继承自 PageModel)
RedirectToAction(String, String)

使用 actionNamecontrollerName将 (Status302Found) 重定向到指定操作。

(继承自 PageModel)
RedirectToAction(String)

使用 actionName将 (Status302Found) 重定向到指定操作。

(继承自 PageModel)
RedirectToActionPermanent(String, Object)

使用指定的 actionNamerouteValuesPermanent 设置为 true 的指定操作(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanent(String, String, Object, String)

使用指定的 actionNamecontrollerNamerouteValuesfragmentPermanent 设置为 true 的指定操作(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanent(String, String, Object)

使用指定的 actionNamecontrollerNamerouteValuesPermanent 设置为 true 的指定操作重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanent(String, String, String)

使用指定的 actionNamecontrollerNamefragmentPermanent 设置为 true 的指定操作重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanent(String, String)

使用指定的 actionNamecontrollerNamePermanent 设置为 true 的指定操作(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanent(String)

使用指定的 actionNamePermanent 设置为 true 的指定操作重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToActionPermanentPreserveMethod(String, String, Object, String)

使用指定的 actionNamecontrollerNamerouteValuesfragment,将 Permanent 设置为 true 并 PreserveMethod 设置为 true 的指定操作(Status308PermanentRedirect)。

(继承自 PageModel)
RedirectToActionPreserveMethod(String, String, Object, String)

使用指定的 actionNameStatus307TemporaryRedirectcontrollerNamerouteValuesfragmentPermanent 设置为 false 且 PreserveMethod 设置为 true 的指定操作。

(继承自 PageModel)
RedirectToPage()

将 (Status302Found) 重定向到当前页。

(继承自 PageModel)
RedirectToPage(Object)

使用指定的 routeValues将 (Status302Found) 重定向到当前页。

(继承自 PageModel)
RedirectToPage(String, Object)

使用指定的 routeValues将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPage(String, String, Object, String)

使用指定的 routeValuesfragment将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPage(String, String, Object)

使用指定的 pageHandlerrouteValues将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPage(String, String, String)

使用指定的 fragment将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPage(String, String)

使用指定的 pageHandler将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPage(String)

将 (Status302Found) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, Object, String)

使用指定的 fragment将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, Object)

使用指定的 routeValues将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, String, Object, String)

使用指定的 routeValuesfragment将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, String, Object)

使用指定的 routeValues将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, String, String)

使用指定的 fragment将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String, String)

将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanent(String)

将 (Status301MovedPermanently) 重定向到指定的 pageName

(继承自 PageModel)
RedirectToPagePermanentPreserveMethod(String, String, Object, String)

使用指定的 pageNameStatus308PermanentRedirectrouteValuesfragment,将 Permanent 重定向到指定路由,PreserveMethod 设置为 true。

(继承自 PageModel)
RedirectToPagePreserveMethod(String, String, Object, String)

使用指定的 pageNamerouteValuesfragmentPermanent 设置为 false 且 PreserveMethod 设置为 true 的指定页面(Status307TemporaryRedirect)。

(继承自 PageModel)
RedirectToRoute(Object)

使用指定的 routeValues将 (Status302Found) 重定向到指定的路由。

(继承自 PageModel)
RedirectToRoute(String, Object, String)

使用指定的 routeNamerouteValuesfragment将 (Status302Found) 重定向到指定的路由。

(继承自 PageModel)
RedirectToRoute(String, Object)

使用指定的 routeNamerouteValues将 (Status302Found) 重定向到指定的路由。

(继承自 PageModel)
RedirectToRoute(String, String)

使用指定的 routeNamefragment将 (Status302Found) 重定向到指定的路由。

(继承自 PageModel)
RedirectToRoute(String)

使用指定的 routeName将 (Status302Found) 重定向到指定的路由。

(继承自 PageModel)
RedirectToRoutePermanent(Object)

使用指定的 routeValuesPermanent 设置为 true 的指定路由的重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToRoutePermanent(String, Object, String)

使用指定的 routeNamerouteValuesfragmentPermanent 设置为 true 的指定路由的重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToRoutePermanent(String, Object)

使用指定的 routeNamerouteValuesPermanent 设置为 true 的指定路由(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToRoutePermanent(String, String)

使用指定的 routeNamefragmentPermanent 设置为 true 的指定路由(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToRoutePermanent(String)

使用指定的 routeNamePermanent 设置为 true 的指定路由的重定向(Status301MovedPermanently)。

(继承自 PageModel)
RedirectToRoutePermanentPreserveMethod(String, Object, String)

使用指定的 routeNameStatus308PermanentRedirectrouteValuesfragment,将 Permanent 重定向到指定路由,PreserveMethod 设置为 true。

(继承自 PageModel)
RedirectToRoutePreserveMethod(String, Object, String)

使用指定的 routeNamerouteValuesfragmentPermanent 设置为 false 且 PreserveMethod 设置为 true 的指定路由(Status307TemporaryRedirect) 。

(继承自 PageModel)
SignIn(ClaimsPrincipal, AuthenticationProperties, String)

使用指定的身份验证方案和 properties创建 SignInResult

(继承自 PageModel)
SignIn(ClaimsPrincipal, String)

使用指定的身份验证方案创建 SignInResult

(继承自 PageModel)
SignOut(AuthenticationProperties, String[])

使用指定的身份验证方案和 properties创建 SignOutResult

(继承自 PageModel)
SignOut(String[])

使用指定的身份验证方案创建 SignOutResult

(继承自 PageModel)
StatusCode(Int32, Object)

通过指定 statusCodevalue 来创建 ObjectResult 对象

(继承自 PageModel)
StatusCode(Int32)

通过指定 statusCode创建 StatusCodeResult 对象。

(继承自 PageModel)
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProvidername更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync(Object, Type, String)

使用 PageModel当前 IValueProvidername中的值更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[])

使用 PageModel当前 IValueProvidername中的值更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>)

使用 PageModel当前 IValueProvidername中的值更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[])

使用 valueProvidername更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>)

使用 valueProvidername更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider)

使用 valueProvidername更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel, String)

使用 PageModel当前 IValueProvider中的值更新指定的 model 实例。

(继承自 PageModel)
TryUpdateModelAsync<TModel>(TModel)

使用 PageModel当前 IValueProvider中的值更新指定的 model 实例。

(继承自 PageModel)
TryValidateModel(Object, String)

验证指定的 model 实例。

(继承自 PageModel)
TryValidateModel(Object)

验证指定的 model 实例。

(继承自 PageModel)
Unauthorized()

创建生成 Status401Unauthorized 响应的 UnauthorizedResult

(继承自 PageModel)
ViewComponent(String, Object)

通过指定要呈现的视图组件的名称来创建 ViewComponentResult

(继承自 PageModel)
ViewComponent(String)

通过指定要呈现的视图组件的名称来创建 ViewComponentResult

(继承自 PageModel)
ViewComponent(Type, Object)

通过指定要呈现的视图组件的 Type 来创建 ViewComponentResult

(继承自 PageModel)
ViewComponent(Type)

通过指定要呈现的视图组件的 Type 来创建 ViewComponentResult

(继承自 PageModel)

适用于