New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

OnLoad

The OnLoad client-side event handler is called when the input control is loaded on the client.

Two parameters are passed to the event handler:

  • sender is the input control.

  • eventArgs is an instance of Sys.EventArgs.

The following example uses the OnLoad event to change the background color of a text box:

ASPNET
<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox1" runat="server">
	<ClientEvents OnLoad="Load" />
</telerik:RadMaskedTextBox>
JavaScript
<script type="text/javascript">
	function Load(sender)
	{
		sender.get_styles().EnabledStyle[0] += "background-color: lemonchiffon;";
		sender.updateCssClass();
	}
</script>
Not finding the help you need?
Contact Support