PageModel Class
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.
Abstract class representing a Page
public ref class PageModel abstract
public ref class PageModel abstract : Microsoft::AspNetCore::Mvc::Filters::IAsyncPageFilter, Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata, Microsoft::AspNetCore::Mvc::Filters::IPageFilter
[Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageModel]
public abstract class PageModel
[Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageModel]
public abstract class PageModel : Microsoft.AspNetCore.Mvc.Filters.IAsyncPageFilter, Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata, Microsoft.AspNetCore.Mvc.Filters.IPageFilter
[<Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageModel>]
type PageModel = class
[<Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageModel>]
type PageModel = class
interface IAsyncPageFilter
interface IFilterMetadata
interface IPageFilter
Public MustInherit Class PageModel
Public MustInherit Class PageModel
Implements IAsyncPageFilter, IFilterMetadata, IPageFilter
- Inheritance
-
PageModel
- Derived
- Attributes
- Implements
Constructors
PageModel() |
Properties
HttpContext |
Gets the HttpContext. |
MetadataProvider |
Gets or sets the IModelMetadataProvider. |
ModelState |
Gets the ModelStateDictionary. |
PageContext |
Gets the PageContext. |
Request |
Gets the HttpRequest. |
Response |
Gets the HttpResponse. |
RouteData |
Gets the RouteData for the executing action. |
TempData |
Gets or sets ITempDataDictionary used by PageResult. |
Url |
Gets or sets the IUrlHelper. |
User |
Gets the ClaimsPrincipal for user associated with the executing action. |
ViewData |
Gets the ViewDataDictionary. |
Methods
BadRequest() |
Creates a BadRequestResult that produces a Status400BadRequest response. |
BadRequest(ModelStateDictionary) |
Creates a BadRequestObjectResult that produces a Status400BadRequest response. |
BadRequest(Object) |
Creates a BadRequestObjectResult that produces a Status400BadRequest response. |
Challenge() |
Creates a ChallengeResult. |
Challenge(AuthenticationProperties, String[]) |
Creates a ChallengeResult with the specified authentication schemes and
|
Challenge(AuthenticationProperties) |
Creates a ChallengeResult with the specified |
Challenge(String[]) |
Creates a ChallengeResult with the specified authentication schemes. |
Content(String, MediaTypeHeaderValue) |
Creates a ContentResult object with Status200OK by specifying a
|
Content(String, String, Encoding) |
Creates a ContentResult object with Status200OK by specifying a
|
Content(String, String) |
Creates a ContentResult object with Status200OK by specifying a
|
Content(String) |
Creates a ContentResult object with Status200OK by specifying a
|
File(Byte[], String, String) |
Returns a file with the specified |
File(Byte[], String) |
Returns a file with the specified |
File(Stream, String, String) |
Returns a file in the specified |
File(Stream, String) |
Returns a file in the specified |
File(String, String, String) |
Returns the file specified by |
File(String, String) |
Returns the file specified by |
Forbid() |
Creates a ForbidResult (Status403Forbidden by default). |
Forbid(AuthenticationProperties, String[]) |
Creates a ForbidResult (Status403Forbidden by default) with the
specified authentication schemes and |
Forbid(AuthenticationProperties) |
Creates a ForbidResult (Status403Forbidden by default) with the
specified |
Forbid(String[]) |
Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes. |
LocalRedirect(String) |
Creates a LocalRedirectResult object that redirects
(Status302Found) to the specified local |
LocalRedirectPermanent(String) |
Creates a LocalRedirectResult object with Permanent set to
true (Status301MovedPermanently) using the specified |
LocalRedirectPermanentPreserveMethod(String) |
Creates a LocalRedirectResult object with Permanent set to
true and PreserveMethod set to true
(Status308PermanentRedirect) using the specified |
LocalRedirectPreserveMethod(String) |
Creates a LocalRedirectResult object with Permanent set to
false and PreserveMethod set to true
(Status307TemporaryRedirect) using the specified |
NotFound() |
Creates an NotFoundResult that produces a Status404NotFound response. |
NotFound(Object) |
Creates an NotFoundObjectResult that produces a Status404NotFound response. |
OnPageHandlerExecuted(PageHandlerExecutedContext) |
Called after the handler method executes, before the action result executes. |
OnPageHandlerExecuting(PageHandlerExecutingContext) |
Called before the handler method executes, after model binding is complete. |
OnPageHandlerExecutionAsync(PageHandlerExecutingContext, PageHandlerExecutionDelegate) |
Called asynchronously before the handler method is invoked, after model binding is complete. |
OnPageHandlerSelected(PageHandlerSelectedContext) |
Called after a handler method has been selected, but before model binding occurs. |
OnPageHandlerSelectionAsync(PageHandlerSelectedContext) |
Called asynchronously after the handler method has been selected, but before model binding occurs. |
Page() |
Creates a PageResult object that renders the page. |
Partial(String, Object) |
Creates a PartialViewResult by specifying the name of a partial to render and the model object. |
Partial(String) |
Creates a PartialViewResult by specifying the name of a partial to render. |
PhysicalFile(String, String, String) |
Returns the file specified by |
PhysicalFile(String, String) |
Returns the file specified by |
Redirect(String) |
Creates a RedirectResult object that redirects (Status302Found)
to the specified |
RedirectPermanent(String) |
Creates a RedirectResult object with Permanent set to true
(Status301MovedPermanently) using the specified |
RedirectPermanentPreserveMethod(String) |
Creates a RedirectResult object with Permanent set to true
and PreserveMethod set to true (Status308PermanentRedirect)
using the specified |
RedirectPreserveMethod(String) |
Creates a RedirectResult object with Permanent set to false
and PreserveMethod set to true (Status307TemporaryRedirect)
using the specified |
RedirectToAction(String, Object) |
Redirects (Status302Found) to the specified action using the
|
RedirectToAction(String, String, Object, String) |
Redirects (Status302Found) to the specified action using the specified |
RedirectToAction(String, String, Object) |
Redirects (Status302Found) to the specified action using the specified
|
RedirectToAction(String, String, String) |
Redirects (Status302Found) to the specified action using the specified
|
RedirectToAction(String, String) |
Redirects (Status302Found) to the specified action using the
|
RedirectToAction(String) |
Redirects (Status302Found) to the specified action using the |
RedirectToActionPermanent(String, Object) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanent(String, String, Object, String) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanent(String, String, Object) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanent(String, String, String) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanent(String, String) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanent(String) |
Redirects (Status301MovedPermanently) to the specified action with
Permanent set to true using the specified |
RedirectToActionPermanentPreserveMethod(String, String, Object, String) |
Redirects (Status308PermanentRedirect) to the specified action with
Permanent set to true and PreserveMethod
set to true, using the specified |
RedirectToActionPreserveMethod(String, String, Object, String) |
Redirects (Status307TemporaryRedirect) to the specified action with
Permanent set to false and PreserveMethod
set to true, using the specified |
RedirectToPage() |
Redirects (Status302Found) to the current page. |
RedirectToPage(Object) |
Redirects (Status302Found) to the current page with the specified |
RedirectToPage(String, Object) |
Redirects (Status302Found) to the specified |
RedirectToPage(String, String, Object, String) |
Redirects (Status302Found) to the specified |
RedirectToPage(String, String, Object) |
Redirects (Status302Found) to the specified |
RedirectToPage(String, String, String) |
Redirects (Status302Found) to the specified |
RedirectToPage(String, String) |
Redirects (Status302Found) to the specified |
RedirectToPage(String) |
Redirects (Status302Found) to the specified |
RedirectToPagePermanent(String, Object, String) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, Object) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String, Object, String) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String, Object) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String, String) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String, String) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanent(String) |
Redirects (Status301MovedPermanently) to the specified |
RedirectToPagePermanentPreserveMethod(String, String, Object, String) |
Redirects (Status308PermanentRedirect) to the specified route with
Permanent set to true and PreserveMethod
set to true, using the specified |
RedirectToPagePreserveMethod(String, String, Object, String) |
Redirects (Status307TemporaryRedirect) to the specified page with
Permanent set to false and PreserveMethod
set to true, using the specified |
RedirectToRoute(Object) |
Redirects (Status302Found) to the specified route using the specified |
RedirectToRoute(String, Object, String) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(String, Object) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(String, String) |
Redirects (Status302Found) to the specified route using the specified
|
RedirectToRoute(String) |
Redirects (Status302Found) to the specified route using the specified |
RedirectToRoutePermanent(Object) |
Redirects (Status301MovedPermanently) to the specified route with
Permanent set to true using the specified |
RedirectToRoutePermanent(String, Object, String) |
Redirects (Status301MovedPermanently) to the specified route with
Permanent set to true using the specified |
RedirectToRoutePermanent(String, Object) |
Redirects (Status301MovedPermanently) to the specified route with
Permanent set to true using the specified |
RedirectToRoutePermanent(String, String) |
Redirects (Status301MovedPermanently) to the specified route with
Permanent set to true using the specified |
RedirectToRoutePermanent(String) |
Redirects (Status301MovedPermanently) to the specified route with
Permanent set to true using the specified |
RedirectToRoutePermanentPreserveMethod(String, Object, String) |
Redirects (Status308PermanentRedirect) to the specified route with
Permanent set to true and PreserveMethod
set to true, using the specified |
RedirectToRoutePreserveMethod(String, Object, String) |
Redirects (Status307TemporaryRedirect) to the specified route with
Permanent set to false and PreserveMethod
set to true, using the specified |
SignIn(ClaimsPrincipal, AuthenticationProperties, String) |
Creates a SignInResult with the specified authentication scheme and
|
SignIn(ClaimsPrincipal, String) |
Creates a SignInResult with the specified authentication scheme. |
SignOut(AuthenticationProperties, String[]) |
Creates a SignOutResult with the specified authentication schemes and
|
SignOut(String[]) |
Creates a SignOutResult with the specified authentication schemes. |
StatusCode(Int32, Object) |
Creates a ObjectResult object by specifying a |
StatusCode(Int32) |
Creates a StatusCodeResult object by specifying a |
TryUpdateModelAsync(Object, Type, String, IValueProvider, Func<ModelMetadata,Boolean>) |
Updates the specified |
TryUpdateModelAsync(Object, Type, String) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, Expression<Func<TModel,Object>>[]) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, Func<ModelMetadata,Boolean>) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Expression<Func<TModel,Object>>[]) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider, Func<ModelMetadata,Boolean>) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String, IValueProvider) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel, String) |
Updates the specified |
TryUpdateModelAsync<TModel>(TModel) |
Updates the specified |
TryValidateModel(Object, String) |
Validates the specified |
TryValidateModel(Object) |
Validates the specified |
Unauthorized() |
Creates an UnauthorizedResult that produces an Status401Unauthorized response. |
ViewComponent(String, Object) |
Creates a ViewComponentResult by specifying the name of a view component to render. |
ViewComponent(String) |
Creates a ViewComponentResult by specifying the name of a view component to render. |
ViewComponent(Type, Object) |
Creates a ViewComponentResult by specifying the Type of a view component to render. |
ViewComponent(Type) |
Creates a ViewComponentResult by specifying the Type of a view component to render. |