DataBinding with Array

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Christof Nordiek

    DataBinding with Array

    I've got following problem:
    I need to present an Array of strings and want to Present it in an
    DataRepeater.
    the Code is like this (in C#):

    string[] NameList = SomeClass.GetNa meList();
    MyRepeater.Data Source = NameList;

    Now I don't know, how I con declare the databinding, it should be something
    like this:

    <asp:repeater id="MyRepeater " runat="server">
    <ItemTemplate >
    .....
    <asp:Label Text='<%# DataBinder.Eval (Container.Data Item, ???? ) %>
    />
    ......
    </ItemTemplate>
    ......
    </asp:repeater>

    Thanks
    cn


  • Marina

    #2
    Re: DataBinding with Array

    Try using just <%# Container.DataI tem %>

    "Christof Nordiek" <cnordiek@amexu s.com> wrote in message
    news:bds9ur$67q $04$1@news.t-online.com...[color=blue]
    > I've got following problem:
    > I need to present an Array of strings and want to Present it in an
    > DataRepeater.
    > the Code is like this (in C#):
    >
    > string[] NameList = SomeClass.GetNa meList();
    > MyRepeater.Data Source = NameList;
    >
    > Now I don't know, how I con declare the databinding, it should be[/color]
    something[color=blue]
    > like this:
    >
    > <asp:repeater id="MyRepeater " runat="server">
    > <ItemTemplate >
    > .....
    > <asp:Label Text='<%# DataBinder.Eval (Container.Data Item, ???? )[/color]
    %>[color=blue]
    > />
    > ......
    > </ItemTemplate>
    > ......
    > </asp:repeater>
    >
    > Thanks
    > cn
    >
    >[/color]


    Comment

    Working...