开发者

Add a id/class to the <tr> generated by the asp.net DataList control

开发者 https://www.devze.com 2023-02-05 20:17 出处:网络
My question is dealing with the DataList control. I am trying to add a click event to the rows of the \"table\" in the OnItemDataBound event.

My question is dealing with the DataList control. I am trying to add a click event to the rows of the "table" in the OnItemDataBound event.

The problem I'm having is I can't get a reference (through a row id attribute) to the "row" being generated by the DataList control (and more specifically the item template). Is there a way to add id attributes to the rows being generated 开发者_StackOverflow社区by the item template?

Thank you.


You should probably create your own ItemTemplate for it.

0

精彩评论

暂无评论...
验证码 换一张
取 消