Search code examples
asp.netheaderdatalist

How to get header template control on postback from another control on aspx page


Im wondering how to get a label control that is in a header template in a datalist on an aspx page. I need the control text to change when the user checks a checkbox outside of the list on the page somewhere. I tried Itemdatabound, but I dont want to have to rebind the list everytime the user checks the box (lots of slow reaction time)

Any ideas? Thanks


Solution

  • try to override DataList_ItemCreated where ListItemType == ListItemType.Header

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.itemcreated.aspx