登录 | 注册 | FAQ
Anonymous

Using an #Eval statement

+ 发表回复

3 篇帖子 分页: 1 / 1


Using an #Eval statement

Andrelis » 周五 3月 07, 2014 10:38 am

Hello, I am trying to get data by using #Eval statement:

<asp:Repeater ID="rptBPData" runat="server" Visible="false">
<ItemTemplate>
<tr>
<td bgcolor="#f4f4f4">
<%#Eval("MDate")%>
</td>
</tr>
</ItemTemplate>
</asp:Repeater>

And I am having problems of getting an array of strings which I need to plot in the chart.
Could you please explain, how to get an array from Eval?
头像

Andrelis

  • 帖子: 1
  • 注册: 周五 3月 07, 2014 10:31 am

Re: Using an #Eval statement

XainPro » 周一 3月 10, 2014 11:34 am

here is it's example

代码: 全选
public object RetrievePagingLettersList()
        {
            return new[] {
                new { Letter = "A" }, new { Letter = "B" },
                new { Letter = "C" }, new { Letter = "D" },
                new { Letter = "E" }, new { Letter = "F" } };
        }


代码: 全选
<asp:Repeater ID="repeater" runat="server">
        <ItemTemplate>
            <asp:Label ID="lblName" runat="server" Text='<%# Eval("Letter") %>'></asp:Label>
        </ItemTemplate>
    </asp:Repeater>
头像

XainPro

  • 帖子: 3933
  • 注册: 周五 2月 17, 2012 8:10 pm

Re: Using an #Eval statement

apamasaze » 周五 5月 26, 2017 1:28 pm

thanks
your opinion is very good
头像

apamasaze

  • 帖子: 1
  • 注册: 周五 5月 26, 2017 1:20 pm


+ 发表回复

分页: 1 / 1