The number of the action can be retrieved from any action-creating method, such as CreateJavaScriptAction.
See theĀ OnControlLostFocus property for examples.