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

Registers a startup script block by page, specifying the registering page object, 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 ( _
    page As Page, _
    type As Type, _
    key As String, _
    script As String _
)
'Usage
Dim page As Page
Dim type As Type
Dim key As String
Dim script As StringSPPageContentManager.RegisterStartupScript(page, _
    type, key, script)
public static void RegisterStartupScript(
    Page page,
    Type type,
    string key,
    string script
)

Parameters

  • page
    Type: System.Web.UI.Page

    The page object that is registering the client script block.

  • type
    Type: System.Type

    The type of the startup script to search for.

  • key
    Type: System.String

    A unique identifier for the client script block.

  • script
    Type: System.String

    The script literal to be registered.

See also

Reference

SPPageContentManager class

SPPageContentManager members

RegisterStartupScript overload

Microsoft.SharePoint.WebControls namespace