Advertisement

05.01.2008 at 04:30PM PDT, ID: 23370387
[x]
Attachment Details

DataList - is it possible to intercept the data as it is being bound?

Asked by bd9000 in Programming for ASP.NET, Visual Basic Programming, .NET Framework 2.0

Tags: asp.net vb.net

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
[+][-]05.01.2008 at 06:46PM PDT, ID: 21484043

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Visual Basic Programming, .NET Framework 2.0
Tags: asp.net vb.net
Sign Up Now!
Solution Provided By: dstanley9
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628