A
A Ratcliffe
Although at the moment, I have a couple of large classic ASP projects on the
go, when I need to take a break, I'm experimenting with ASP.NET (with both
VB.NET and C#).
I notice that most wizard-generated code uses DataBinder.Eval for
datafields, which is fine for most database fields, however I also have
image filenames in a couple of fields in one of my test tables.
Looking at the DataBinder documentation, I see that Eval is overloaded, and
I was wondering if it would be possible to add an additional overload for
Images, which would either evaluate the image's filename to an <IMG> tag, or
place a transparent spacer gif,  , or alternate image if the filename is
NULL or "".
I know I could just write a separate function to do this, but it would be
good to have everything being sensibly (My)DataBinder.Evaluated (maybe I
ought to suggest this as an addition in ASP.NET Framework 1.2).
Looking at one of the overloads of Eval, I assume I could use the Format
specifier to convert the filename into an <IMG> tag, but that wouldn't cover
the possibilities of a NULL or "".
Does anyone have any light to shine on this?
Yours,
Ann-Marie Ratcliffe
(e-mail address removed)
go, when I need to take a break, I'm experimenting with ASP.NET (with both
VB.NET and C#).
I notice that most wizard-generated code uses DataBinder.Eval for
datafields, which is fine for most database fields, however I also have
image filenames in a couple of fields in one of my test tables.
Looking at the DataBinder documentation, I see that Eval is overloaded, and
I was wondering if it would be possible to add an additional overload for
Images, which would either evaluate the image's filename to an <IMG> tag, or
place a transparent spacer gif,  , or alternate image if the filename is
NULL or "".
I know I could just write a separate function to do this, but it would be
good to have everything being sensibly (My)DataBinder.Evaluated (maybe I
ought to suggest this as an addition in ASP.NET Framework 1.2).
Looking at one of the overloads of Eval, I assume I could use the Format
specifier to convert the filename into an <IMG> tag, but that wouldn't cover
the possibilities of a NULL or "".
Does anyone have any light to shine on this?
Yours,
Ann-Marie Ratcliffe
(e-mail address removed)