Class 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.

working Principle

Connect resources is by handling events of the beginning of rednering page (PreRenderComplete):

  1. in the collection of controls on the page (including Master page) are the controls with the following IDs:
    • FlexberryScripts is a placeholder for the connection скриптов;
    • FlexberryStyles is a placeholder for the connection стилей;
    • FlexberryRawHtml is a placeholder for the connection of special technological элементов;
  2. the collection of placeholders controls are added controls that connect resources.

If controls are found, an exception will be raised.

Setting

1.To connect resources based on the placeholders you want to configure unity (web.config):

<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" />
Переведено сервисом «Яндекс.Переводчик» http://translate.yandex.ru