PlaceholderPageContentConnector is used to connect the technological scripts and styles necessary to operate the controls and runtime using the controls-placeholders. This method allows you to configure your application more flexible by adding application code before/after the technological and user.
Is an alternative method of connection resources FilterPageContentConnector.
Connect resources is by handling events of the beginning of rednering page (
- in the collection of controls on the page (including Master page) are the controls with the following IDs:
FlexberryScriptsis a placeholder for the connection скриптов;
FlexberryStylesis a placeholder for the connection стилей;
FlexberryRawHtmlis a placeholder for the connection of special technological элементов;
- the collection of placeholders controls are added controls that connect resources.
If controls are found, an exception will be raised.
PreRenderCompletethe elements connected after will not be added to the markup.
1.To connect resources based on the placeholders you want to configure
<register type="NewPlatform.Flexberry.Web.Http.IPageContentConnector, NewPlatform.Flexberry.Web.Http" mapTo="NewPlatform.Flexberry.Web.Http.PlaceholderPageContentConnector, NewPlatform.Flexberry.Web.Http" />
2.In the page layout / Master page you need to add controls-placeholders:
<asp:Placeholder ID="FlexberryStyles" runat="server" /> <asp:Placeholder ID="FlexberryScripts" runat="server" /> <asp:Placeholder ID="FlexberryRawHtml" runat="server" />
FlexberryStylesusually added in the <head> of the page.
FlexberryScriptsaffect the correct operation of custom scripts added to the page in
FlexberryScriptsshould be placed higher in the markup.