标签我只是结合的标签是这样的:的GridView绑定从数据库和额外的文本
<asp:Label ID="Label3" runat="server" Font-Size="8pt" Text='<%# Bind("Field")%>'></asp:Label>
但我想添加一些文字旁边的“场”,所以标签上写着“现场,更多的文字“我正在尝试这个,但它不起作用。
<asp:Label ID="Label3" runat="server" Font-Size="8pt" Text='<%# Bind("RoleID") + "more text"%>'></asp:Label>
我也曾尝试:
<asp:Label ID="Label3" runat="server" Font-Size="8pt" Text='<%# String.Format(Bind("RoleID") + "more text"%>'></asp:Label>
当我这样做,我得到这个错误,“绑定”未声明。由于其保护级别,它可能无法访问。“ – mlg74 2013-05-14 03:29:32
@ mlg74现在尝试我更新我的答案... – 2013-05-14 03:50:09