J
Jonathan Wood
Okay, I've spent all day trying to resolve problem after problem using the
ListView control. But I'm starting to give up on this issue and could use
some help.
I have a databound ListView control. I can use <%# Eval("Column") %> in the
ItemTemplate to display the data I want and it works okay. However, I need
to perform some complex formatting on some of the data. Also, I've read that
Eval isn't that efficient. So I'd like to accomplish any of the following
but have been unable to.
1. Format the data from code in the ItemDataBound event. I can set the text
of a control in this event, but I cannot figure out how to obtain the data
for the current item.
2. Another option would be to call my formatting routine with one of the
data fields. But I couldn't get that working either.
3. Finally, the best option would probably be to embed my own routine right
in the markup that could use Response.Write() to write the data how I want.
But, again, how can I get the data associated with the current item?
Thanks for any tips.
Jonathan
ListView control. But I'm starting to give up on this issue and could use
some help.
I have a databound ListView control. I can use <%# Eval("Column") %> in the
ItemTemplate to display the data I want and it works okay. However, I need
to perform some complex formatting on some of the data. Also, I've read that
Eval isn't that efficient. So I'd like to accomplish any of the following
but have been unable to.
1. Format the data from code in the ItemDataBound event. I can set the text
of a control in this event, but I cannot figure out how to obtain the data
for the current item.
2. Another option would be to call my formatting routine with one of the
data fields. But I couldn't get that working either.
3. Finally, the best option would probably be to embed my own routine right
in the markup that could use Response.Write() to write the data how I want.
But, again, how can I get the data associated with the current item?
Thanks for any tips.
Jonathan