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.PageThe page object that is registering the client script block.
type
Type: System.TypeThe type of the startup script to search for.
key
Type: System.StringA unique identifier for the client script block.
script
Type: System.StringThe script literal to be registered.