HOY
HOY

Reputation: 1007

Prevent width overflow of a user control inside a panel

This is how my application looks like, As you see my user control does not fit into my panel. How can I fit my user control into the panel?

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>

Upvotes: 0

Views: 865

Answers (2)

Amol Kolekar
Amol Kolekar

Reputation: 2325

Use "OverFlow" Property in Style...Hope this may help you...

<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>

Upvotes: 1

Sowmya
Sowmya

Reputation: 26969

You cant fit the table in that table coz table has many text fields which takes width for that. Try giving width in percentage

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

Upvotes: 0

Related Questions