ASP.NET Aikido Controls Client-Side Object Model Code Snippets

Tom Puglisi / Friday, May 21, 2010

Today is the official anniversary of the PacMan video game from the 80s. Google has done a great job of adding a browser embedded version of the game. After you have spent some time advancing several levels you may feel guilty that you have not been so productive. In order to compensate for the time you have spent playing PacMan, I have something that will allow you to redeem yourself and increase your knowledge of the Infragistics NetAdvantage ASP.NET Aikido controls’ client-side object model (CSOM). With this knowledge, you will be more productive, you will be able to design and architect your application more elegantly by handling client-side events, and interacting with the control’s client-side instance directly.

Client-Side Events
The NetAdvantage ASP.NET Aikido controls have many server-side string properties that actually represent client-side events. These string properties are assigned the name of the JavaScript function that gets invoked whenever a certain control event takes place on the client. These server-side properties that represent client-side events are well documented in the API guide by containing examples of the event and how to use the event arguments. The following information explains how to get to this information:

  1. Start by going to the NetAdvantage ASP.NET online help:
    http://help.infragistics.com/NetAdvantage/ASPNET/2010.1/CLR3.5/
  2. In the Table of Contents (TOC) locate and expand the API Reference Guide
  3. Locate and expand the Infragistics.Web assembly TOC node:
  4. Locate and expand the Infragistics.Web.UI.ListControls Namespace TOC node

  5. Locate and expand the WebDropDown TOC node. We will use WebDropDown as the example. Locate and expand the Properties TOC node:

  6. Now locate and click the ClientEvents property TOC node:

  7. The ClientEvents API topic shows the type that represents the WebDropDown control’s ClientEvents property. You can see that this property is of type DropDownClientEvents. Click the link to the DropDownClientEvents API documentation:

  8. This takes you to the DropDownClientEvents Class API Documentation. In this topic, click the link to the DropDownClientEvents Members topic:

  9. This takes you to the class member documentation. In this topic you will find server-side string properties that actually represent various client-side events associated with WebDropDown. Click on the ActivationChanged link:

  10. This takes you to your end-point; the example JavaScript code for how to wire up the event (using C# or VB.NET code in your code-behind) as well as the JavaScript function signature and example code for interacting with the event arguments and the control all using client-side JavaScript.


Using this logic, you can get to lots of CSOM documentation that shows how to leverage more of the Aikido framework based NetAdvantage ASP.NET controls.