newbie: autosize

Discussion in 'ASP .Net' started by Jeff, Jul 14, 2006.

  1. Jeff

    Jeff Guest

    Hey

    asp.net 2.0

    I've read (asp.net 2.0 documentation) that the Panel control in asp.net 2.0
    supports a AutoSize property and a AutoSizeMode. I've checked in the my
    property page of the Panel control on my webpage and I cannot find these
    properties.... So how to I set the values of these properties?

    Best Regards

    Jeff
    Jeff, Jul 14, 2006
    #1
    1. Advertising

  2. I don't know what documentation you read but there is no such animal.

    http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.panel_properties.aspx

    --
    -Demetri


    "Jeff" wrote:

    > Hey
    >
    > asp.net 2.0
    >
    > I've read (asp.net 2.0 documentation) that the Panel control in asp.net 2.0
    > supports a AutoSize property and a AutoSizeMode. I've checked in the my
    > property page of the Panel control on my webpage and I cannot find these
    > properties.... So how to I set the values of these properties?
    >
    > Best Regards
    >
    > Jeff
    >
    >
    >
    =?Utf-8?B?RGVtZXRyaQ==?=, Jul 14, 2006
    #2
    1. Advertising

  3. The WINDOWS FORMS panel control supports these properties, but not the
    ASP.NET version of the control.
    You can get a similar effect in ASP.NET by clearing the width and height
    properties of the panel.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "Jeff" <> wrote in message
    news:...
    > Hey
    >
    > asp.net 2.0
    >
    > I've read (asp.net 2.0 documentation) that the Panel control in asp.net
    > 2.0 supports a AutoSize property and a AutoSizeMode. I've checked in the
    > my property page of the Panel control on my webpage and I cannot find
    > these properties.... So how to I set the values of these properties?
    >
    > Best Regards
    >
    > Jeff
    >
    Steve C. Orr [MVP, MCSD], Jul 14, 2006
    #3
  4. Jeff

    Jeff Guest

    Thanks, I just a got a question related to your post:

    I have another master page (masterpage.master) and webpage where in the
    webpage (lets call it default.aspx) contains a label control. During runtime
    this label control gets many rows of data (it get it's value from the
    database, and the value contains many <BR/>).... This label control is
    placed in the default.aspx in the ContentPlaceHolder named "content" (see
    below)... But the Panel (see below) doesn't grow to fit the size of it's
    controls. The Label control writes data pass the panel border. Check this
    link: http://home.online.no/~au-holme/pub/66303/autosize.PNG at this link
    you see the label control has a green background... it writes pass the panel
    and continues to writes on the Document... But I want the panel to shrink &
    grow according to it's content...

    Master page :
    <asp:panel ID="Panel1" runat="server" Style="z-index: 100; left: 165px;
    position: absolute; top: 107px" Width="602px" CssClass="profile_info">
    <asp:ContentPlaceHolder ID="content" runat="server">
    &nbsp;</asp:ContentPlaceHolder>
    </asp:panel>
    <asp:panel ID="Panel2" runat="server" Height="649px" Style="z-index: 101;
    left: 3px;
    position: absolute; top: 109px" Width="156px">
    <asp:ContentPlaceHolder ID="sidebar" runat="server">
    </asp:ContentPlaceHolder>
    </asp:panel>

    ..profile_info
    {
    height:100%;
    background-color:Green;
    color:Red;
    }

    This is the label control in default.aspx:
    <asp:Label ID="lblInfo" runat="server" Style="z-index: 107; left: 5px;
    position: absolute; top: 232px" Width="589px"></asp:Label>

    Any suggestions to how I can make this panel shrink & grow to fit it's
    contents?

    Jeff


    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > The WINDOWS FORMS panel control supports these properties, but not the
    > ASP.NET version of the control.
    > You can get a similar effect in ASP.NET by clearing the width and height
    > properties of the panel.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "Jeff" <> wrote in message
    > news:...
    >> Hey
    >>
    >> asp.net 2.0
    >>
    >> I've read (asp.net 2.0 documentation) that the Panel control in asp.net
    >> 2.0 supports a AutoSize property and a AutoSizeMode. I've checked in the
    >> my property page of the Panel control on my webpage and I cannot find
    >> these properties.... So how to I set the values of these properties?
    >>
    >> Best Regards
    >>
    >> Jeff
    >>

    >
    >
    Jeff, Jul 14, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dennis Strickland via .NET 247

    How to autosize the row heigth in a Datagrid

    Dennis Strickland via .NET 247, Jun 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,350
    Uri Dor
    Jun 15, 2004
  2. raymond chiu

    set autosize of datagrid to no

    raymond chiu, Dec 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,710
    Christopher Reed
    Dec 29, 2005
  3. =?Utf-8?B?U0FM?=

    How do you autosize a Table Cell?

    =?Utf-8?B?U0FM?=, Aug 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    14,388
    John Timney \(MVP\)
    Aug 10, 2006
  4. Eliyahu Goldin

    Re: autosize columns of gridview

    Eliyahu Goldin, Dec 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,321
    Steven Cheng[MSFT]
    Dec 13, 2006
  5. Patrick
    Replies:
    2
    Views:
    157
    Thomas 'PointedEars' Lahn
    Feb 23, 2004
Loading...

Share This Page