AllowViewAttribute()

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

public AllowViewAttribute()

AllowViewAttribute(string)

Specifies the view that can be selected for this content type model by view name. The view name is the filename of the Razor view without (.cshtml) extension and path, e.g. for a Razor view with path '~/Views/ContentPage.cshtml' the view 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 AllowViewAttribute(params string names)

Parameters

names string

The case insensitive view names

In this article