SPPageContentManager.RegisterStartupScript method (Control, Type, String, String)

Registers a startup script block by control, specifying the registering control, the script type, an identifying key, and the script literal.

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

Syntax

'Declaration
Public Shared Sub RegisterStartupScript ( _
    ctrl As Control, _
    type As Type, _
    key As String, _
    script As String _
)
'Usage
Dim ctrl As Control
Dim type As Type
Dim key As String
Dim script As StringSPPageContentManager.RegisterStartupScript(ctrl, _
    type, key, script)
public static void RegisterStartupScript(
    Control ctrl,
    Type type,
    string key,
    string script
)

Parameters

  • type
    Type: System.Type

    The type of the client script block.

  • key
    Type: System.String

    A unique identifier for the script block.

  • script
    Type: System.String

    The startup script literal to be registered.

See also

Reference

SPPageContentManager class

SPPageContentManager members

RegisterStartupScript overload

Microsoft.SharePoint.WebControls namespace