Home All Groups Group Topic Archive Search About
Author
12 Dec 2005 10:47 AM
Evan Camilleri
In ASP.NET using

<%# DataBinder.Eval(Container, "DataItem.R") %>

I need that if DataItem.R = 0 then nothing (not even a zero) will be
displayed.

Author
12 Dec 2005 10:55 AM
Patrick.O.Ige
Evan you should be able to get the DataItem in ITEMDATABOUND
and there do whatever you would like to do
Patrick

Show quoteHide quote
"Evan Camilleri" <e7***@yahoo.co.uk.nospam> wrote in message
news:uKDemkw$FHA.1408@TK2MSFTNGP15.phx.gbl...
> In ASP.NET using
>
> <%# DataBinder.Eval(Container, "DataItem.R") %>
>
> I need that if DataItem.R = 0 then nothing (not even a zero) will be
> displayed.
>
>
Are all your drivers up to date? click for free checkup

Author
12 Dec 2005 1:11 PM
Karl Seguin
To elaborate on Patrick's post, you have two options.  Do the formatting
inline, or in the ItemDataBound.  Typically, hooking up the ItemDataBound,
while a bit more work, provides you with cleaner code and greater
flexibility.  You can see some detailed examples of both these methods at:
http://openmymind.net/index.aspx?documentId=8#4

Karl

Show quoteHide quote
"Evan Camilleri" <e7***@yahoo.co.uk.nospam> wrote in message
news:uKDemkw$FHA.1408@TK2MSFTNGP15.phx.gbl...
> In ASP.NET using
>
> <%# DataBinder.Eval(Container, "DataItem.R") %>
>
> I need that if DataItem.R = 0 then nothing (not even a zero) will be
> displayed.
>

Bookmark and Share