How do I assign a variable to a container.dataitem in repeater control

Discussion in 'ASP .Net Web Controls' started by Chumley the Walrus, May 12, 2004.

  1. I need to assign a variable to a record drawn from a db by way of a
    repeater control:


    <ASP:Repeater id="thedata" runat="server">

    <itemtemplate>
    <%dim display

    display = Container.DataItem("displaygroup") %>

    <%# Container.DataItem("displaygroup")%>

    </ItemTemplate>
    </ASP:Repeater>

    the display = Container.DataItem("displaygroup") does not work (error:
    Name 'Container' is not declared.), and i need to find a way to assign
    what's in <%# Container.DataItem("displaygroup")%> a variable

    thanks
    chum
     
    Chumley the Walrus, May 12, 2004
    #1
    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. Lauchlan M
    Replies:
    1
    Views:
    7,863
    Lauchlan M
    Oct 15, 2003
  2. Tom Lee
    Replies:
    2
    Views:
    1,005
    Chris Carter
    Dec 9, 2003
  3. Daniel

    Container.DataItem doubt

    Daniel, Dec 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    466
    Daniel
    Dec 16, 2003
  4. Earl Teigrob
    Replies:
    0
    Views:
    575
    Earl Teigrob
    Jul 7, 2004
  5. =?Utf-8?B?RXJpYw==?=

    Repeater control -- Using e.Item.DataItem

    =?Utf-8?B?RXJpYw==?=, May 10, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    17,826
    ichi27
    Jun 2, 2011
  6. abargaddon
    Replies:
    2
    Views:
    23,710
    abargaddon
    Feb 2, 2008
  7. Joe Rattz
    Replies:
    2
    Views:
    883
    Robert Koritnik
    Sep 10, 2004
  8. Replies:
    0
    Views:
    205
Loading...