Embedding Third-Party Libraries

  • 2 minutes to read

DevExpress Bootstrap controls use the functionality of the following external client libraries.

  • jquery.validate.min.js (1.17)
  • jquery.validate.unobtrusive.min.js (3.2.6)
  • jquery.unobtrusive-ajax.min.js (3.2.4)
IMPORTANT

In addition to the third-party libraries, these web controls use DevExtreme. To learn more, refer to DevExtreme documentation.

Declaration

By default, on adding such a DevExpress control, it loads only the DevExtreme library to a web page without loading third-party libraries that are listed above.

For the control to work properly, you either need to manually add the missing third-party libraries, or enable the control to load them automatically by adding the following references to the "resources" section in the Web.config file.


<devExpress>
    <!-- ... -->
    <resources>
        <add type="ThirdParty" />
        <add type="DevExtreme" />
    </resources>
</devExpress>

These settings can be extended (e.g., to avoid the automatic loading of some of these assemblies).

However, the following configuration will result in an exception, because it will become impossible to manually attach DevExtreme in this case (because DevExtreme also requires certain third-party libraries, the latter will not be registered properly on the page under this configuration).


<!-- This configuration is incomplete and will result in an exception. -->
<resources>
    <add type="ThirdParty" />
</resources>

The above configuration will result in loading of DevExtreme either before adding third-party libraries or after specific control scripts. Consider the following order in which the client libraries are normally loaded.

  1. Third-party libraries.
  2. DevExtreme.
  3. Specific control scripts.

To avoid automatic loading of any libraries by a control (e.g., when such libraries are already referenced on the web page), declare an empty "resources" section and manually attach DevExtreme resources and the required third-party libraries (such as jQuery and Globalize) to the web page.


<resources>
</resources>

Deleting the DevExpress "resources" section from the Web.config file will enable the default behavior (with automatic loading only DevExtreme, without adding third-party libraries).

On adding such DevExpress controls to a project, the "resources" section should automatically become registered in the application's Web.config file.


<configuration>
  <configSections>
    <sectionGroup name="devExpress">
      <!-- ...  -->
      <section name="resources" type="DevExpress.Web.ResourcesConfigurationSection, DevExpress.Web.v18.1, Version=18.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false" />
    </sectionGroup>
  </configSections>
<!-- ...  -->
</configuration>

DevExpress configuration section

Corresponding Class

SettingsConfigurationSection