AllowLayoutAttribute Constructors

AllowLayoutAttribute Constructors

Specifies the layout that can be selected for this page view model by providing either a layout name or layout view path through the appropriate property.

Overloads

AllowLayoutAttribute() Specifies the layout that can be selected for this page view model by providing either a layout name or layout view path through the appropriate property.
AllowLayoutAttribute(string) Specifies the layout that can be selected for this page view model by layout name. The layout name is the filename of the view without (.cshtml) extension and path, e.g. for a view with path '~/Views/ContentPage.cshtml' the layout name is 'ContentPage'. If the name causes conflicts with other views with the same name but a different view path, use the property with the parameterless constructor instead.

AllowLayoutAttribute()

Specifies the layout that can be selected for this page view model by providing either a layout name or layout view path through the appropriate property.

public AllowLayoutAttribute();

AllowLayoutAttribute(string)

Specifies the layout that can be selected for this page view model by layout name. The layout name is the filename of the view without (.cshtml) extension and path, e.g. for a view with path '~/Views/ContentPage.cshtml' the layout name is 'ContentPage'. If the name causes conflicts with other views with the same name but a different view path, use the property with the parameterless constructor instead.

public AllowLayoutAttribute(string name);

Parameters

name string
The case insensitive layout name