RadControls for ASP.NET AJAX
The OnButtonClick client-side event handler is called when the user clicks on a button associated with the input control. This can be the button that is displayed when the ShowButton property is True, or one of the spin buttons that is displayed when the ShowSpinButtons property is True.
Note |
|---|
The OnButtonClick event is supported by all RadInput controls.
|
Two parameters are passed to the event handler:
Use the OnButtonClick event to provide a client-side response when the user clicks on a button:
CopyASPX
<telerik:RadTextBox ID="RadTextBox1" runat="server" ShowButton="True">
<ClientEvents OnButtonClick="ToggleEnabled" />
</telerik:RadTextBox>
CopyJavaScript
<script type="text/javascript">
function ToggleEnabled(sender, eventArgs)
{
if (sender.get_enabled())
sender.disable();
else
sender.enable();
}
</script>
See Also