ScriptLink.GetRegisterOnDemandScriptStatement method

For the specified script file, calculates the client-side script necessary to register it on demand.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetRegisterOnDemandScriptStatement ( _
    page As Page, _
    fileName As String, _
    localizable As Boolean _
) As String
'Usage
Dim page As Page
Dim fileName As String
Dim localizable As Boolean
Dim returnValue As String

returnValue = ScriptLink.GetRegisterOnDemandScriptStatement(page, _
    fileName, localizable)
public static string GetRegisterOnDemandScriptStatement(
    Page page,
    string fileName,
    bool localizable
)

Parameters

  • fileName
    Type: System.String

    Name of the script file to register on demand

  • localizable
    Type: System.Boolean

    True if the script file is localizable

Return value

Type: System.String
Javascript statement used to register the speficied file on demand. It is not wrapped in script tags.

Remarks

This method is used to generate Script On Demand registration scripts. These can be registered as startup scripts to be executed during an UpdatePanel update.

See also

Reference

ScriptLink class

ScriptLink members

Microsoft.SharePoint.WebControls namespace