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

Registers a client script block using a page, specifying a registering page, an identifying key, the script type, and the script literal. Intended for execution before the page is rendered.

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

Syntax

'Declaration
Public Shared Sub RegisterClientScriptBlock ( _
    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.RegisterClientScriptBlock(page, _
    type, key, script)
public static void RegisterClientScriptBlock(
    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 client script to register.

  • key
    Type: System.String

    A unique identifier for the script block.

See also

Reference

SPPageContentManager class

SPPageContentManager members

RegisterClientScriptBlock overload

Microsoft.SharePoint.WebControls namespace