AddressOf with parameter

后端 未结 8 621
误落风尘
误落风尘 2021-01-07 23:33

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         


        
8条回答
  •  一向
    一向 (楼主)
    2021-01-08 00:26

    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).

提交回复
热议问题