Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have problem with me code plz help :)

(1)
<br />
IEnumerable<datarow> serach = from row in table.AsEnumerable() select row;<br />
</datarow>


(2)
<br />
        <%<br />
           foreach (var top_people in serach)<br />
             <br />
               { %>  <br />
         <asp:Label ID="moda2" runat="server" <br />
         Text='<%# Bind(top_people["member_photo"])%>' /><br />
            <br />
<br />
         <%} %><br />

but i have error in databind i dont know what is worng ?
this is message error
("A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind")
Posted
Comments
Parwej Ahamad 9-Jul-11 16:31pm    
I think you have to provide column name only lie:
Bind("member_photo")

Why are you using old school classic ASP techniques?

This can very easily be accomplished using a Repeater or DataList control

<asp:Repeater runat="server" id="myRepeater">
  <ItemTemplate>
    <asp:Label runat="server" Text=<% Eval("member_photo") %> />
  </asp:Repeater>
</ItemTemplate>


IEnumerable search = from row in table.AsEnumerable() 
                     select row;
myRepeater.DataSource = search;
myRepeater.DataBind();
 
Share this answer
 
thanx mr mark :) this is work
 
Share this answer
 

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



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