Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB.NET
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 me out
Posted 25-Sep-12 4:51am
Edited 25-Sep-12 4:52am
Malli_S at 25-Sep-12 9:56am
You can do it by changing the button's height and width property. But where you really stuck?
joshrduncan2012 at 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 at 25-Sep-12 10:12am
How can i show you the screenshot..

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
<asp:Panel ID="Panel1" runat="server">
            <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>

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 205
1 Zoltán Zörgő 200
2 Peter Leow 160
3 BillWoodruff 85
4 bling 70
0 Sergey Alexandrovich Kryukov 9,543
1 OriginalGriff 6,901
2 Peter Leow 4,737
3 Zoltán Zörgő 4,404
4 CHill60 2,932

Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100