RegisterJSFunction Method (WebControl)
- Last UpdatedAug 21, 2026
- 1 minute read
Register a function that can be called from JavaScript code.
'Declaration
Public Sub RegisterJSFunction( _
ByVal functionName As String, _
ByVal handler As JSFunctionInvokeHandler _
)
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.