I am creating a custom ASP.NET AJAX server control in which multiple instances of the control may be placed on the page. That control wraps JavaScript objects, which I need access to those objects for each individual control. For example, the JavaScript object may have a property called "x" and control1 might have x set to 5 and control2 might x set to 10. How do I get access to each individual control's JavaScript objects? Here is a bit of a code snippet that might help:
HTML
<CustomControl:MyControl ID="MyControl1" runat="server" x="5"/>
<CustomControl:MyControl ID="MyControl2" runat="server" x="10"/>
JavaScript
alert(MyControl1.x); //result 5
alert(MyControl2.x); //result 10