PageContentManager is designed to connect skitov (js) and styles (css) in C# code.
PageContentManageris a replacement for the deprecated ContextHelper. All new projects should use it.
The main purpose of
PageContentManager - formation of the list of resources that need to be connected to the current page. The connection is made through
IPageContentConnector (which must be configured in unity).
There are two ways of connecting resources:
- based on filtering HTML (default for reasons of backward compatibility);
- on the basis of the controls-placeholders (recommended);
setup activation script
By analogy with Ohm
ContextHelper‘and his methods
PageContentManager‘and have the ability to customize the activation of the script. To this end, the method call to add the script has a flag
onPageLoad the default
Thus, the analog method is
Own method of connection of scripts and styles
To use your own method of connection resources, you must create a new class and inherit interface