|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
FormattingIn 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 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. > > 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 quoteMY ASP.Net tutorials http://www.openmymind.net/ http://openmymind.net/redirector.aspx?documentId=51 - Learn about AJAX! "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. >
Other interesting topics
ASP.NET 2.0 Themes are not WYSIWYG
Exceptions kill Sessions? Javascript two fields merged to one hidden field Print Page Rewriting a URL that does not point to a file CheckBox unchecked status detection in DataGrid Template Column Role based security Connection String how to... ImageMap Coordinate Question asp treeview |
|||||||||||||||||||||||