locked
sperated by comma inside repeater control RRS feed

  • Question

  • User-1026607185 posted

    <asp:Repeater ID="Documents" runat="server" OnItemDataBound="Documents_OnItemDataBound" EnableViewState="true">
    <ItemTemplate>
    <td >
    <strong><span id="spnServiceBundleService" runat="server" /></strong>
    </td>
    </ItemTemplate>
    </asp:Repeater>

    at the movement my data display like    below 

    Document1  Document2  Document3         etc. 

    but I wanted to display it with  comma seperated. 

    Document1,Document2,Document3

    pleaselet le me know how to get my output with my asp.net repeater control ... 

    thanks 

    Wednesday, October 10, 2018 1:30 PM

Answers

  • User2103319870 posted

    I wanted to display it with  comma seperated. 

    Document1,Document2,Document3

    You can use the SeparatorTemplate to add comma in Repeater Values

      <asp:Repeater ID="Documents" runat="server" OnItemDataBound="Documents_OnItemDataBound" EnableViewState="true">
                    <ItemTemplate>
                        <td>
                            <strong><span id="spnServiceBundleService" runat="server" /></strong>
                        </td>
                    </ItemTemplate>
                     <separatortemplate>, </separatortemplate>
                </asp:Repeater>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 10, 2018 2:25 PM