Output DataList Item Index!

Discussion in 'ASP .Net' started by Adam Knight, Sep 28, 2005.

  1. Adam Knight

    Adam Knight Guest

    Hi all,

    I am wanting to display a data lists item index inline in a script.
    Meaning not from code behind but <%# %> ect.

    Obviously i can display a dataitem by using:
    <%# Container.DataItem("qtext") %>

    What i want to do is prepend the datalist item index to the previous text.

    Is this possible?

    Any help appreciated.

    Adam
     
    Adam Knight, Sep 28, 2005
    #1
    1. Advertising

  2. Adam Knight

    Mr Newbie Guest

    <%# MyTextToPrePendVariable & MyDataItemExpression %>

    or

    <%# "MyTextToPrePend is added to " & "MyDataItemExpression" %>


    HTH Mr N


    "Adam Knight" <> wrote in message
    news:...
    > Hi all,
    >
    > I am wanting to display a data lists item index inline in a script.
    > Meaning not from code behind but <%# %> ect.
    >
    > Obviously i can display a dataitem by using:
    > <%# Container.DataItem("qtext") %>
    >
    > What i want to do is prepend the datalist item index to the previous text.
    >
    > Is this possible?
    >
    > Any help appreciated.
    >
    > Adam
    >
     
    Mr Newbie, Sep 28, 2005
    #2
    1. Advertising

  3. Adam Knight

    Brock Allen Guest

    <%# Container.ItemIndex %>

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen

    > Hi all,
    >
    > I am wanting to display a data lists item index inline in a script.
    > Meaning not from code behind but <%# %> ect.
    >
    > Obviously i can display a dataitem by using:
    > <%# Container.DataItem("qtext") %>
    > What i want to do is prepend the datalist item index to the previous
    > text.
    >
    > Is this possible?
    >
    > Any help appreciated.
    >
    > Adam
    >
     
    Brock Allen, Sep 29, 2005
    #3
    1. Advertising

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. Nevyn Twyll
    Replies:
    8
    Views:
    1,916
  2. Stimp
    Replies:
    3
    Views:
    5,754
    Stimp
    Sep 10, 2004
  3. karthikeyavenkat
    Replies:
    2
    Views:
    630
    Bryce
    Mar 17, 2005
  4. Replies:
    2
    Views:
    217
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    323
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page