vote up 0 vote down
star

I am getting the following error for an item in a GridView: **A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind. **

<ItemTemplate>
    <asp:LinkButton ID="lnkColumn" runat="server" CausesValidation="False" CommandName="Select"
        Text='<%# Bind("TableName.Column") %>' />
</ItemTemplate>

I can't work out why it works fine on my dev server, but not on the test machine. It also works on the production box? We are running ASP.NET 3.5 for the website.

offensive?
comments (3)

1 Answer:

vote up 2 vote down

At the risk of being rude: Is it worth double checking your database schema, looking for a missing field? Is anything different between your environments? Try using winmerge to compare your environments (its great!)

Another idea: comment out the 'bind' row, and replace it with these, to get a better idea what's going on:

<%= Table.Field %> 
<%= Table.Field.GetType().ToString() %> 
<%= Table.GetType().ToString() %>
link|offensive?
comments (2)

Your Answer:

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.