Is it possible to intercept items in a BOUND DataList using ItemDataBound event?
I have to read in several columns from a row and do some data processing on them.
For example, I read in a thumbnail image name from the DB, check to see if it exists, if it does, I need to display it nicely. Then I have to create a hyperlink based on the data from several columns, test to see which type of hyperlink it will be, then create the hyperlink and display it (requires IF-THEN logic that can't be templated).
I was about to manually generate a list of items from a database using the HTMLwriter and parsing through a DataTable 1 row at a time, but I thought it might be possible to do this with a DataList (I know it can be done with a GridView, but I can't find that functionality in a DataList). I can get the value of a label, but have no idea how to re-bind it.
Any ideas, with examples?
Start Free Trial