RegisterJSFunction Method (WebControl)
Register a function that can be called from JavaScript code.
Syntax
'Declaration Public Sub RegisterJSFunction( _ ByVal functionName As String, _ ByVal handler As JSFunctionInvokeHandler _ )
'Usage Dim instance As WebControl Dim functionName As String Dim handler As JSFunctionInvokeHandler instance.RegisterJSFunction(functionName, handler)
public void RegisterJSFunction( string functionName, JSFunctionInvokeHandler handler )
public: void RegisterJSFunction( String^ functionName, JSFunctionInvokeHandler^ handler )
Parameters
- functionName
- The JavaScript function name.
- handler
- The code to be executed when the function is called. Important note: Do not call any JavaScript code inside this callback handler code as this can cause re-entrancy issues. Calling Javascript code from within this callback is not supported.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also