HeaderAttribute

Sets a ViewData["Header"] value for an action or controller.

Namespace:
Inetdev.AspNetCore
Type:
Class
Public:
Yes
Protected:
No
Sealed:
No
Abstract:
No
Inherits from:
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute

Constructors

HeaderAttribute

Initializes a new instance of HeaderAttribute.

Signature:
public Void HeaderAttribute(header)
Parameters
Name Type Summary
header String The header to show or a resource name.
Exceptions
Type Summary
ArgumentNullOrEmptyException Thrown when header is null or empty.

Properties

Header

Value of the header.

Signature:
public String Header { get; set; }

ResourceType

The type of localization resources.

Signature:
public Type ResourceType { get; set; }

Methods

OnActionExecuting

Sets the ViewData["Header"] element with a localized data from the header.

Signature:
public Void OnActionExecuting(context)
Parameters
Name Type Summary
context ActionExecutingContext The ActionExecutingContext.
Exceptions
Type Summary
ArgumentNullException Thrown when context is null.