Skip to main content

ExtensionsFactory.GetScripts(Script[]) Method

Returns the HTML code representing the rendering of the specified scripts.

Namespace: DevExpress.Web.Mvc.UI

Assembly: DevExpress.Web.Mvc5.v22.1.dll


public MvcHtmlString GetScripts(
    params Script[] scriptItems


Name Type Description
scriptItems Script[]

An array of Script objects defining the attached scripts.


Type Description

A MvcHtmlString object representing the HTML-encoded string.


Use the GetScripts method to attach the scripts required for the DevExpress ASP.NET MVC extensions.

If the “resources” section of an application’s Web.config file contains a reference to the “ThirdParty” and/or “DevExtreme” libraries, the GetScripts method will attach the corresponding libraries and additional resources to the View.

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

For more information about this configuration option and a complete list of the scripts attached to each extension suite, see Embedding Third-Party Libraries.


The following example demonstrates how to attach the DevExpress MVC Extensions’ scripts to the View.

        new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout }, 
        new Script { ExtensionSuite = ExtensionSuite.HtmlEditor }, 
        new Script { ExtensionSuite = ExtensionSuite.GridView }, 
        new Script { ExtensionSuite = ExtensionSuite.PivotGrid },
        new Script { ExtensionSuite = ExtensionSuite.Editors }, 
        new Script { ExtensionSuite = ExtensionSuite.Chart },
        new Script { ExtensionSuite = ExtensionSuite.Report },
        new Script { ExtensionSuite = ExtensionSuite.Scheduler },
        new Script { ExtensionSuite = ExtensionSuite.TreeList }
See Also