网络 项绑定事件; 当绑定数据时触发; 项目数据绑定
Attributes can be inserted into the tags by providing a custom event handler for the ItemCreated or ItemDataBound event.
通过为ItemCreated或ItemDataBound事件提供自定义事件处理程序,可将属性插入到标记中。
The ItemDataBound event is raised after the controls in an item have been data bound.
ItemDataBound事件在项中的控件完成数据绑定后引发。
However, if the attributes depend on actual data, add the attributes in the handler for the ItemDataBound event.
但如果属性依赖于实际数据,则将属性添加到ItemDataBound事件的处理程序中。
Select the DataList control, and then in the Events tab of the Properties window, double-click the ItemDataBound event.
选择DataList控件,然后在“属性”窗口的“事件”选项卡中,双击ItemDataBound事件。