更新时间:2023-10-06 21:15:04
你应该做到以下几点:
foreach
循环中创建的每个 CheckBox
实例设置 ID
属性.CheckedChanged
事件处理程序在引发控件事件之前
ID
property for each instance of CheckBox
you create in your foreach
loop.CheckedChanged
event handler is attached at some point of the page life-cycle before control events are raised