Ramco Ramco

Ramco Ramco

  • 422
  • 3.4k
  • 500.1k

LinkButton at the end

Sep 15 2022 2:46 AM

Hi

  I want to display LinkButton at the end even if there is no record in Inner repeater. It is linked to outer Repeater.

<table class='table table-bordered table-hover' id='tblParticipant'>
    <thead>
        <tr>
            <th class='nosort2'>#</th>
            <th >Id</th>
            <th >Name</th>
            <th >Action</th>
            <th colspan="4" bgcolor="#4F81BD" align="center"><font size="5" color="white" face="calibri" >Nominee Details</font></th>
        </tr>
    </thead>
    <tbody>
        <asp:Repeater ID="rptParticipant" runat="server" OnItemDataBound="rptParticipant_ItemDataBound">
            <ItemTemplate>
                <tr>
                    <td><asp:Literal ID="ltrlNum" Text="<%# Convert.ToString(Container.ItemIndex + 1) %>" runat="server"></asp:Literal></td>
                    <td><asp:Label ID="lblId" runat="server" Text='<%#Eval ("Id") %>' /></td>
                    <td><asp:Label ID="lblName" runat="server" Text='<%#Eval ("Name") %>' /></td>
                    <td><asp:LinkButton ID="lnkNomiee" OnClick="Add" runat="server" class="navbar-nav-link font-weight-semibold" ><span class="text-pink"><i class="icon-folder-upload mr-1"></i>Add Nominee</span></asp:LinkButton></td>
                    <td>
                        <table class='table table-columned' id='tblNominee'>
                            <thead>
                                <tr>
                                    <th style="width:30%">Name</th>
                                    <th style="width:30%">Designation</th>
                                    <th style="width:20%">Phone No</th>
                                    <th style="width:20%">Email</th>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="rptNominee" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:Literal ID="ltrlNomineeName" runat="server" Text='<%# Eval("Name") %>'></asp:Literal>
                                            </td>
                                            <td>
                                                <asp:Literal ID="ltrlDesignation" runat="server" Text='<%# Eval("Designation") %>'></asp:Literal>
                                            </td>
                                            <td>
                                                <asp:Literal ID="ltrlPhoneNo" runat="server" Text='<%# Eval("PhoneNo") %>'></asp:Literal>
                                            </td>
                                            <td>
                                                <asp:Literal ID="ltrlEmail" runat="server" Text='<%# Eval("Email") %>'></asp:Literal>
                                            </td>

                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </tbody>
</table>
Thanks


Answers (2)