Click here to Skip to main content
15,881,730 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,
I am adding buttons dynamically on panel and displaying some data.So i want the buttons to be adjusted on panel without any space on panel.How can i do that..help me out
Posted
Updated 25-Sep-12 3:52am
v2
Comments
Malli_S 25-Sep-12 9:56am    
You can do it by changing the button's height and width property. But where you really stuck?
joshrduncan2012 25-Sep-12 9:56am    
Have you tried looking for a solution via google or bing first? Can you show us a screenshot of what you have designed already?
DileepkumarReddy 25-Sep-12 10:12am    
How can i show you the screenshot..

1 solution

If you are creating the buttons dynamically, then you can try creating the buttons in a Table cell and then place the table in the panel. This will provide uniform spacing.
I have added a sample HTML to explain the same.
XML
<asp:Panel ID="Panel1" runat="server">
    <table>
        <tr>
            <td><asp:Button ID="Button1" runat="server" Text="Button 1" onclick="Button1_Click" /></td>
            <td><asp:Button ID="Button2" runat="server" Text="Button 2" onclick="Button2_Click" /></td>
        </tr>
    </table>
 </asp:Panel>
 
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