Gridview错误:对Bind的调用格式不正确 [英] Gridview Error :A call to Bind was not well formatted

查看:75
本文介绍了Gridview错误:对Bind的调用格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下用于gridview的代码:

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:

解析器错误消息:对Bind的调用格式不正确.请请参阅文档,了解要绑定的正确参数.

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

错误图片:

注意:我的查询(绑定网格)包含字段N/A

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

推荐答案

我在绑定中添加了 [N/A] 并有效.

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

如下:

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

这篇关于Gridview错误:对Bind的调用格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆