Databinding simple question

Discussion in 'Microsoft ASP .NET' started by jsubscribe@gmail.com, Oct 19, 2005.

  1. Guest

    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
     
    , Oct 19, 2005
    #1
    1. Advertisements

  2. intrader Guest

    On Wed, 19 Oct 2005 14:40:42 -0700, jsubscribe wrote:

    > 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!
     
    intrader, Oct 19, 2005
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. aroth

    simple databinding question

    aroth, Feb 23, 2004, in forum: Microsoft ASP .NET
    Replies:
    4
    Views:
    195
    Martin Dechev
    Feb 23, 2004
  2. Ian
    Replies:
    0
    Views:
    135
  3. Guest

    Help on simple databinding ???

    Guest, Mar 28, 2006, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    120
    Guest
    Mar 28, 2006
  4. Paul
    Replies:
    6
    Views:
    199
    Karl Seguin [MVP]
    Jul 18, 2006
  5. jobs
    Replies:
    0
    Views:
    2,101
Loading...

Share This Page