共用方式為


ScriptLink.Register Method (Page, String, Boolean, Boolean)

Registers the specified script file for the specified Web page and localizable and defer values.

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

Syntax

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

Parameters

  • name
    Type: System.String

    A string that contains the name of the script file.

  • localizable
    Type: System.Boolean

    true if the script can be localized; otherwise, false.

  • defer
    Type: System.Boolean

    true to defer downloading and parsing of script files, including the core.js file, until after other elements of the page are downloaded; otherwise, false.

See Also

Reference

ScriptLink Class

ScriptLink Members

Register Overload

Microsoft.SharePoint.WebControls Namespace