views:

16

answers:

2

hi, i am designing an registration page in asp.net.to group the components(label, ddl and text boxes) i am using panels,but while running the page positions of components are changing. How to fix components to a particular position?

thanks with regards, radha

A: 

You can use Table Tag For Example

Manish kosta
A: 

better to add all the controls in a page to a table and set the table row and column position E.g:

<table style="width: 100%;">
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:Panel ID="Panel1" runat="server">
                        <table>
                        <tr>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> 
                        </td>
                        <td>
                            <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            <asp:DropDownList ID="DropDownList1" runat="server">
                            </asp:DropDownList>
                        </td>
                        </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>

        </table>
anishmarokey
That's not necessarily 'better'. You can create awesome, fluent CSS forms that are table less. You can't provide a solution to a problem before you see/know the problem.
rickp