共用方式為


ScriptLink.RegisterOnDemand Method

Registers the script file to load on the Web page as an on-demand script.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Sub RegisterOnDemand ( _
    page As Page, _
    strFile As String, _
    localizable As Boolean _
)
'Usage
Dim page As Page
Dim strFile As String
Dim localizable As BooleanScriptLink.RegisterOnDemand(page, strFile, _
    localizable)
public static void RegisterOnDemand(
    Page page,
    string strFile,
    bool localizable
)

Parameters

  • strFile
    Type: System.String

    A string type representing the name of the script file to be registered.

  • localizable
    Type: System.Boolean

    true if the script file is in the localized directory; otherwise, false.

See Also

Reference

ScriptLink Class

ScriptLink Members

Microsoft.SharePoint.WebControls Namespace