【问题标题】:Gridview Error :A call to Bind was not well formattedGridview 错误:对 Bind 的调用格式不正确
【发布时间】:2013-08-08 16:40:43
【问题描述】:

我有以下 gridview 代码:

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

当我运行它时,它给了我上面部分的错误:

解析器错误消息:对 Bind 的调用格式不正确。请 有关 Bind 的正确参数,请参阅文档。

错误图片:

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

【问题讨论】:

    标签: c# asp.net .net vb.net visual-studio-2008


    【解决方案1】:

    我在 bind 中添加了[N/A],它起作用了。

    如下:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-21
      相关资源
      最近更新 更多