I was working on some sample stuff that I'll be posting later and ran into a problem. I had 2 different update panels; inside one was just a div, inside the other one was a repeater. Inside the repeater I had a bunch of checkboxes, and when I checked/unchecked them, I needed the first update panel to be updated. This posed a couple of problems:
- A checkbox doesn't have a CommandName property, and can't be used to trigger a Repeater's ItemCommand event
This I got around by declaring the event handler for the checkbox in the markup: OnCheckedChanged=”myCB_OnCheckedChanged”, and in the event handler I can cast the sender argument to a checkbox. The other problem:
- An UpdatePanel's list of triggers can't include a control that's inside a template
Which means I can't say <atlas:ControlEventTrigger ControlID=”myCB” EventName=”myCB_OnCheckedChanged” />, since myCB doesn't actually exist at runtime. Instead, in myCB_OnCheckedChanged, I can just say: updatePanel1.Update(); and everything works fine.
Hope this helps...