Formatting

  • Thread starter Thread starter Evan Camilleri
  • Start date Start date
E

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.
 
Evan you should be able to get the DataItem in ITEMDATABOUND
and there do whatever you would like to do
Patrick
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top