October 1st, 2003, 04:01 PM
I am developing an ASP.Net Web Application. Can you please tell me how to do the following:
* Create an event handler for a control array. i.e. I am dynamically creating an an array of image buttons and need a click event for the array.
October 2nd, 2003, 12:01 PM
I think I can help you out.....
The best way to figure this out (so you learn something is to create a button in a ASP.NET webform. Then double click on it and look at the CODEBEHIND.
If you look at the code closely, you will notice two things... one is it gets registered at the top of the page either in the DECs or in the AUTOCREATED CRAP up top. This is important because when you look at the ONCLICK method, at the very end you will see a HANDLES attribute. This is where you tie the ONCLICK method to an item.
Try following this syntax and make it work for your array and see if that works out for you!