Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I couldn't find out what the error is please see below & suggest me :


DataBinding: 'System.Data.DataRowView' does not contain a property with the name '__Page'

ASP.NET
<asp:DataList ID="DLCategory" runat="server" RepeatColumns="1" RepeatDirection="Horizontal">
        <ItemTemplate>
           <a href="Category.aspx?Cid=<%#Eval(ID) %>">  // show error in this part
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name") %>'></asp:Label></a>
            </ItemTemplate>
        </asp:DataList>
Posted

1 solution

try this :-
ASP.NET
<a href='<%# "Category.aspx?Cid={0}",  Eval("ID") %>'>
          <asp:label id="Label1" runat="server" text='<%# Eval("Name") %>'>
          </asp:label>
  </a>
 
Share this answer
 
v4
Comments
Mas11 5-Mar-13 3:33am    
Thanks for the answer ! but it show some format error.
Raje_ 5-Mar-13 3:54am    
I updated the solution, now try.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900