Click here to Skip to main content
15,907,874 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have multiple tables inside repeater control and would like to add show/hide button on left corner for each table. What is the best way to do?
Posted
Comments
Thanks7872 20-Mar-15 5:18am    
Best way to do is to start coding. You know what you want. Try to implement it and come back with specific question,along with code when you face any issue with it.

1 solution

Something like this

XML
<asp:Repeater ID="RepeaterTables" runat="server">
    <ItemTemplate>
        <p>
            <button onclick="$('#table<%#Container.ItemIndex %>').toggle(); return false;">Toggle</button>
        </p>
        <table id="table<%#Container.ItemIndex %>">
            <tr>
                <td>
                    Your table here
                </td>
            </tr>
        </table>
    </ItemTemplate>
</asp:Repeater>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900