Hello,
I am trying to use the data binding example from 'Professional ASP.NET'
pages 323-325, but have substituted the DataList for a DataGrid. What I
want is to display a different <img> depending on a 'Status' field in my
datarow.
I just cannot get the example to work for either DataList or DataGrid and
receive an error from the debugger that reads:
System.InvalidCastException: Exception of type System.InvalidCastException
was thrown.
, at the following line:
Dim objRowVals As DataRowView = CType(objArgs.Item.DataItem, DataRowView)
, which is a line from the book example. Can anyone tell me what I am
doing wrong and is there an easier way to handle data binding events?
Thx,
Henri