J
John Kotuby
Hello all..
I have what is probably a simple question but I can't find the answer for it
yet.
I have a Repeater bound to a Datatable.
In the OnItemDataBound event controller in the Code Behind I am trying to
pull a value from one of the DataSource fields that is not bound to a
control that is part of the repeater. If it was bound to a label control,
for example I could just do e.Item.FindControl("lblCost").text, to get that
value.
I see an e.Item.DataItem referenced in the Docs and my first impulse was to
try something simple like,
varValue = e.Item.DataItem("fieldname"). value, but that doesn't work.
Can I reference the bound Datasource here somehow?
Or is it as simple as varValue = Eval("fieldname") as it is done in the HTML
page?
Thanks for your answers....
I have what is probably a simple question but I can't find the answer for it
yet.
I have a Repeater bound to a Datatable.
In the OnItemDataBound event controller in the Code Behind I am trying to
pull a value from one of the DataSource fields that is not bound to a
control that is part of the repeater. If it was bound to a label control,
for example I could just do e.Item.FindControl("lblCost").text, to get that
value.
I see an e.Item.DataItem referenced in the Docs and my first impulse was to
try something simple like,
varValue = e.Item.DataItem("fieldname"). value, but that doesn't work.
Can I reference the bound Datasource here somehow?
Or is it as simple as varValue = Eval("fieldname") as it is done in the HTML
page?
Thanks for your answers....