Skip to content

ModulePageLayoutAttribute class

namespace: Serenity.Web   assembly: Serenity.Extensions

Sets the layout of the module pages of a controller, e.g. the ones created with GridPage or PanelPage, when the page does not set a layout of its own. It lets a controller, and the ones that derive from it, tell the layout of its pages in one place, which a page that is not based on a view file, e.g. a panel page created from a module script only, has no other way to do.

[AttributeUsage(AttributeTargets.Class)]
public class ModulePageLayoutAttribute : Attribute
parameter description
layout The layout to use.

Public Members

name description
ModulePageLayoutAttribute(…) Sets the layout of the module pages of a controller, e.g. the ones created with GridPage or PanelPage, when the page does not set a layout of its own. It lets a controller, and the ones that derive from it, tell the layout of its pages in one place, which a page that is not based on a view file, e.g. a panel page created from a module script only, has no other way to do.
Layout { get; } Gets the layout to use.

Exceptions

exception condition
ArgumentNullException Layout is null.

See Also