Gridview Error :A call to Bind was not well formatted

孤街浪徒 提交于 2020-01-05 08:28:10

问题


I have following code for gridview :

<asp:TemplateField HeaderText="N/A">
<ItemTemplate>
<asp:Label ID="lblENGNA" runat="server" Text='<%# Bind("N/A") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>

When i run this its giving me error for above section that:

Parser Error Message: A call to Bind was not well formatted. Please refer to documentation for the correct parameters to Bind.

Error Image:

Note: my query(which binds grid) contains field N/A


回答1:


I added [N/A] in bind and it worked.

Its as follows:

<asp:Label ID="lblENGNA" runat="server" Text='<%# Bind("[N/A]") %>'>


来源:https://stackoverflow.com/questions/18101105/gridview-error-a-call-to-bind-was-not-well-formatted

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!