Databinding simple question

J

jsubscribe

Hello,

I have following code in my ASP.NET webform..

<td nowrap align=center><%# DataBinder.Eval(Container, "DataItem.FLAG")
%></td>

Flag value could be either 'R' or 'P' - if its 'R' I want to print
'Rejected' in font Red and if its 'P' I want to print 'Processed' in
greeen.

Now I have been able to do this with <td nowrap align=center><%#
GETSTRING(DataBinder.Eval(Container, "DataItem.FLAG")) %></td>

but I just wanted to find out what are other ways to achive this? And
if what I did above is a good way to do it.

Thankx

AZXML
 
I

intrader

Hello,

I have following code in my ASP.NET webform..

<td nowrap align=center><%# DataBinder.Eval(Container, "DataItem.FLAG")
%></td>

Flag value could be either 'R' or 'P' - if its 'R' I want to print
'Rejected' in font Red and if its 'P' I want to print 'Processed' in
greeen.

Now I have been able to do this with <td nowrap align=center><%#
GETSTRING(DataBinder.Eval(Container, "DataItem.FLAG")) %></td>

but I just wanted to find out what are other ways to achive this? And
if what I did above is a good way to do it.

Thankx

AZXML
You are on the right track.
You can ofcourse do the code in a stored procedure!
 

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

Top