设计的时候一个button和textbox再一行的  可是什么一运行他们就2行了 ,明明那一行有那么宽的,它还另外跑一行  太气人了

解决方案 »

  1.   

    button和textbox外面有没有套table?,查看下网页源码看看宽度是不是真的够
      

  2.   

    贴source code吧,不然谁知道。
      

  3.   

     <table style="height: 133px; width: 908px;" align="center">
                <tr align="center">
                    <td style="width: 128px;" rowspan="3">
                        <asp:TextBox ID="gsumBox1" runat="server" Width="95px"></asp:TextBox>
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <asp:Button ID="gsum" runat="server" Text="Button" OnClick="gsum_Click" />
                        &nbsp;&nbsp; &nbsp;
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                            DataTextField="type" DataValueField="type" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged"
                            RepeatDirection="Horizontal" Width="237px">
                        </asp:RadioButtonList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TechTrexConnectionString %>"
                            SelectCommand="SELECT [type] FROM [Goodssee]"></asp:SqlDataSource>
            <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="520px" AllowPaging="True" Height="173px" OnPageIndexChanging="GridView1_PageIndexChanging" OnSorting="GridView1_Sorting">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <EditRowStyle BackColor="#999999" />
            </asp:GridView>
                        
                    </td>
                </tr>
                <tr>
                </tr>
                <tr>
                </tr>
            </table>代码如上