SPPageContentManager.RegisterClientScriptBlock method (Control, Type, String, String)
Registers a client script block using a control, specifying the registering control, 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 ( _
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.RegisterClientScriptBlock(ctrl, _
type, key, script)
public static void RegisterClientScriptBlock(
Control ctrl,
Type type,
string key,
string script
)
Parameters
ctrl
Type: System.Web.UI.ControlThe control that is registering the client script block.
type
Type: System.TypeThe type of the client script to register.
key
Type: System.StringA unique identifier for the script block.
script
Type: System.StringThe script literal to register.