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?

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

    Nested repeater databinding question

    Ed Allan, Aug 1, 2003, in forum: Microsoft ASP .NET
    Replies:
    0
    Views:
    446
    Ed Allan
    Aug 1, 2003
  2. Jason S

    databinding question

    Jason S, Dec 5, 2003, in forum: Microsoft ASP .NET
    Replies:
    4
    Views:
    231
    Jason S
    Dec 5, 2003
  3. aroth

    simple databinding question

    aroth, Feb 23, 2004, in forum: Microsoft ASP .NET
    Replies:
    4
    Views:
    374
    Martin Dechev
    Feb 23, 2004
  4. Ian
    Replies:
    0
    Views:
    218
  5. Guest

    Help on simple databinding ???

    Guest, Mar 28, 2006, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    169
    Guest
    Mar 28, 2006
  6. Paul
    Replies:
    6
    Views:
    312
    Karl Seguin [MVP]
    Jul 18, 2006
  7. jobs
    Replies:
    0
    Views:
    3,023
  8. rodchar

    simple databinding

    rodchar, Dec 5, 2007, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    172
    rodchar
    Dec 12, 2007
Loading...