Version

Setting Up a Client Side Event

Before You Begin

The Ultimate UI for ASP.NET controls include a rich client-side object model, allowing you to manipulate how users interact with controls.

To complete this topic, we assume the following:

  • You have created a new ASP.NET AJAX-Enabled Web Site.

  • You have an instance of ASP.NET Ajax ScriptManager on the WebForm.

  • You have enabled Infragistics Application Styling for this application. For information on how to do this, see Enabling Application Styling Using the web.config File.

  • An instance of WebSplitter™ is on the form.

What You Will Accomplish

You will set up a client-side event for the WebSplitter control.

Note
Note:

This procedure is similar for all Ultimate UI for ASP.NET controls built on the 'Ultimate UI for ASP.NET AJAX Framework'.

Follow these Steps

  1. In Source view, locate the closing <HEAD> tag and place the following snippet before it.

In JavaScript:

<script type="text/javascript"><!--
-$$->$$</script>
  1. Inside the script block, define a function for WebSplitter’s Expanding event. The event accepts two arguments. For more information on these arguments, see Client-Side Object Model (CSOM) CHM.

In JavaScript:

...
function WebSplitter1_Expanding(sender, splitArgs){
}
...
  1. Return Design view and select the WebSplitter control.

  2. In the Properties window, locate the ClientEvents property and expand it.

  3. Next to the Expanding property, type "WebSplitter1_Expanding". The event is now defined.

Note
Note:

At this point you will need to add code to the event in order for WebSplitter to perform a task when expanding.