0

Hello,

I have a field in a data table with leading spaces. When I look at the visualizer I can see the spaces, but after I bind the data to a repeater control the spaces have been removed on the web page. Is there anyway to prevent the repeater control from removing these spaces?

I'm using c# in Visual Studio 05.

Thanks.

Here is a snippet of code:

<asp:Repeater ID="coverageRptr" runat="server">
        <HeaderTemplate>
            <table border="1">
            <tr style="background-color:Gray">
                <th style="font-weight:bold">Account Name</th>
                <th style="font-weight:bold">DUNS</th>
                <th style="font-weight:bold">Coverage Zone</th>
            </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr style="background-color:Silver;">
                <td>
                    <%# DataBinder.Eval(Container.DataItem, "ACCOUNT_NAME") %>

The account name field is the one that has leading spaces in it.

Edited by __avd: Added [code] tags.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
0
<pre> 
  <%# DataBinder.Eval(Container.DataItem, "ACCOUNT_NAME") %>
</pre>

Edited by __avd: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.