How to access datasource fields in an ASP.NET Repeaters ItemDataBound event?

后端 未结 3 1200
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 10:42

I have a Repeater control that is being bound to the result of a Linq query.

I want to get the value of one of the datasource\'s fields in the ItemDataBound event, but I

3条回答
  •  庸人自扰
    2021-02-02 11:17

    The data that is used for the current item can be found from the EventArgs.

    RepeaterItemEventArgs e
    
    e.Item.DataItem
    

提交回复
热议问题