One way or another I need to link groupID (and one other integer) to the button I am dynamically adding.. any ideas?
What I can do;
AddHandler mybutt
There are few ways to do that depending of the complexity and number of parameters required. 1. Use Tag for adding a complex structure 2. Inherit the the Button class and add the values as class members then populate them before using it. That gives you a lot more flexibility.
If you are using web version 3. You cannot add it to Tag, but for simple values assign it to index use .Attributes.Add("name"). This gets added to the HTML tags and not the Server side. You can then use the index to access a server side structure for complex systems. 4. Use sessions to store values and store the session reference to Name attribute as described above (#3).