ItemDataBound 'e.item.dataitem(“key”)' wit

2019-05-11 22:54发布

问题:

This question already has an answer here:

  • Get data being bound to ListView on DataBound event 4 answers

With the ASP.NET Repeater control, I am used to being able to access my data item values in the ItemDataBound Event Handler by doing:

e.item.dataitem("column_name")

However, it seems with the ListView control this is not possible. How can I access the data item values?

回答1:

Get data being bound to ListView on DataBound event