ScriptLink.GetRegisterOnDemandScriptStatement method
For the specified script file, calculates the client-side script necessary to register it on demand.
Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetRegisterOnDemandScriptStatement ( _
page As Page, _
fileName As String, _
localizable As Boolean _
) As String
'Usage
Dim page As Page
Dim fileName As String
Dim localizable As Boolean
Dim returnValue As String
returnValue = ScriptLink.GetRegisterOnDemandScriptStatement(page, _
fileName, localizable)
public static string GetRegisterOnDemandScriptStatement(
Page page,
string fileName,
bool localizable
)
Parameters
page
Type: System.Web.UI.PagePage to register the script file for
fileName
Type: System.StringName of the script file to register on demand
localizable
Type: System.BooleanTrue if the script file is localizable
Return value
Type: System.String
Javascript statement used to register the speficied file on demand. It is not wrapped in script tags.
Remarks
This method is used to generate Script On Demand registration scripts. These can be registered as startup scripts to be executed during an UpdatePanel update.