E
Eagle
How do I add text to a template column with a label; I want to add "Name: "
in front of the ClientName:
<asp:TemplateColumn HeaderText="Client">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientCity") %>' ID="Label5"></asp:Label><br>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientState") %>' ID="Label6"></asp:Label>
</ItemTemplate>
I've tried several ways and keep getting a "server tag not well formed":
<asp:Label runat="server" Text="Name: " & '<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
<asp:Label runat="server" Text="Name: " + '<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
Thanks for your help.
in front of the ClientName:
<asp:TemplateColumn HeaderText="Client">
<ItemTemplate>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientCity") %>' ID="Label5"></asp:Label><br>
<asp:Label runat="server" Text='<%# DataBinder.Eval(Container,
"DataItem.ClientState") %>' ID="Label6"></asp:Label>
</ItemTemplate>
I've tried several ways and keep getting a "server tag not well formed":
<asp:Label runat="server" Text="Name: " & '<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
<asp:Label runat="server" Text="Name: " + '<%# DataBinder.Eval(Container,
"DataItem.ClientName") %>' ID="Label2"></asp:Label><br>
Thanks for your help.