2012-09-03 34 views
0

这就是我的应用程序的外观,正如您看到我的用户控件不适合我的面板。我如何将我的用户控件放入面板?防止面板内用户控件的宽度溢出

enter image description here

<asp:Panel ID="Panel1" runat="server" Width="500px" BorderColor="#000066" 
    BorderStyle="Solid"> 
    <uc2:OrderDetail ID="uc_OrderDetail" runat="server" /> 
</asp:Panel> 

回答

0

你不能适合该表堂妹表的表有很多文本字段这需要宽了点。先给宽度百分比

<asp:Panel ID="Panel1" runat="server" Width="100%" BorderColor="#000066" 
     BorderStyle="Solid"> 
     <uc2:OrderDetail ID="uc_OrderDetail" runat="server" /> 
    </asp:Panel> 
+0

这样,它只是改变了面板的宽度(以页面宽度) ,但是我的用户控件仍然没有像面板中那样操作。它的长度比页面长。 – HOY

1

使用“溢出”属性,风格...希望这可以帮助你......

<asp:Panel ID="Panel1" runat="server" Width="500px" BorderColor="#000066" style="overflow:scroll;" BorderStyle="Solid"> 
    <uc2:OrderDetail ID="uc_OrderDetail" runat="server" style="width:100%"/> 
</asp:Panel>