Professional Web Applications Themes

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

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 ...

  1. #1

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

    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 Guest

  2. #2

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

    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 Guest

Similar Threads

  1. #39634 [NEW]: session variable and normal variable
    By erhanbaris at gmail dot com in forum PHP Bugs
    Replies: 3
    Last Post: November 27th, 10:09 AM
  2. Cannot set session variable
    By Jean Genie in forum Coldfusion - Getting Started
    Replies: 11
    Last Post: October 26th, 06:40 PM
  3. session variable and IE
    By Trzi in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: July 11th, 04:51 PM
  4. [SESSION] Session variable deleted prior to command?
    By Ivo Fokkema in forum PHP Development
    Replies: 0
    Last Post: July 16th, 12:59 PM
  5. Session Variable help please
    By stewboy webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 16th, 01:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139