Datalist - how (if) to use a sub variable or session variable in the footer?

Discussion in 'ASP .Net' started by KathyB, Jul 17, 2003.

  1. KathyB

    KathyB Guest

    Hi, sorry to be greedy with all my posts lately, but can you tell I'm
    doing new things this week?

    I've just done my first datalist (a simple one), that give me one
    column of records. I would like to put the total count of the rows
    into the control's footer. I couldn't find any references for doing
    this and ended up trying several things, one of which was assigning a
    variable within the sub creating the datalist control, and when that
    didn't work (referencing varCount), I tried setting a Session variable
    (Boards)...the number is correct. However the following doesn't
    produce the number, just the "boards" text...any ideas?

    <%# Session("Boards") + " boards total" %>

    Thanks again for ALL the help...it is TRULY appreciated by a new
    user!!!

    Kathy
     
    KathyB, Jul 17, 2003
    #1
    1. Advertising

  2. KathyB

    dave Guest

    on item created, test if it is an item you want to count,
    add it to a variable in viewstate then, put it in the
    footer.
    >-----Original Message-----
    >Hi, sorry to be greedy with all my posts lately, but can

    you tell I'm
    >doing new things this week?
    >
    >I've just done my first datalist (a simple one), that

    give me one
    >column of records. I would like to put the total count of

    the rows
    >into the control's footer. I couldn't find any references

    for doing
    >this and ended up trying several things, one of which was

    assigning a
    >variable within the sub creating the datalist control,

    and when that
    >didn't work (referencing varCount), I tried setting a

    Session variable
    >(Boards)...the number is correct. However the following

    doesn't
    >produce the number, just the "boards" text...any ideas?
    >
    ><%# Session("Boards") + " boards total" %>
    >
    >Thanks again for ALL the help...it is TRULY appreciated

    by a new
    >user!!!
    >
    >Kathy
    >.
    >
     
    dave, Jul 17, 2003
    #2
    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,963
  2. Ben
    Replies:
    2
    Views:
    954
  3. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    2,165
    Lawrence D'Oliveiro
    May 20, 2011
  4. Henrik
    Replies:
    1
    Views:
    460
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
  5. Richard Gration

    Legitimate use of calling a sub as &sub

    Richard Gration, Feb 23, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    135
    Brian McCauley
    Feb 23, 2005
Loading...

Share This Page