Pages Html

NuGet packageOwin.Framework.Pages.Html
GitHub sourceOwinFramework.Pages.Html

Home |  Readme

[PartOf] attribute | The OWIN Framework Pages

The [PartOf] Attribute

The [PartOf] attribute can be attached to any page element that can produce Css and Javascript assets. The [PartOf] attribute defines the namespace to use for these assets to ensure that names of Css classes and Javascript functions do not conflict.

Unless you are writing a very large application, you will likely use only one package for all of your application code.

If you are creating a reusable package for distribution to application developers then you must put all of your elements into packages so that the application developer can choose a namespace for each package and avoid naming conflicts between imported packages.

The [PartOf()] attribute has the following properties you can set.


The name of the Package that defines the namespace for assets belonging to this page element.

This is also used in name resolution for any attributes attached to this element. For example if this element refers to layouts, regions, components etc by name then these names will be resolved within the scope of the package. To refer to elements from other packages, prefix the element name with the namespace of the package and a colon.