Custom Server Control with Panel --> how?

Discussion in 'ASP .Net Building Controls' started by Gönen EREN, Aug 11, 2003.

  1. Gönen EREN

    Gönen EREN Guest

    Hi ,
    I want to built a custom server control which has:
    * a panel
    * a button which sets the visiblity of the panel true or false

    and finally a want to add controls in the custom control
    (label,datagrid,...) in the aspx page just like an asp:panel

    i have a very small experience in building server controls so if you have
    any ideas or sample code please send it
    thanks for your help.

    Gönen EREN
     
    Gönen EREN, Aug 11, 2003
    #1
    1. Advertising

  2. Gönen EREN

    Teemu Keiski Guest

    You may want to look at so-called composite controls.Basically it is a
    control that creates its child controls on its CreateChildControls method
    and also implements INamingContainer interface Check examples at these
    newsgroups and also provided resources.

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    http://www.mansoft.fi

    AspInsiders Member, www.aspinsiders.com
    ASP.NET Forums Moderator, www.asp.net
    AspAlliance Columnist, www.aspalliance.com


    "Gönen EREN" <> wrote in message
    news:...
    > Hi ,
    > I want to built a custom server control which has:
    > * a panel
    > * a button which sets the visiblity of the panel true or false
    >
    > and finally a want to add controls in the custom control
    > (label,datagrid,...) in the aspx page just like an asp:panel
    >
    > i have a very small experience in building server controls so if you have
    > any ideas or sample code please send it
    > thanks for your help.
    >
    > Gönen EREN
    >
    >
    >
     
    Teemu Keiski, Aug 16, 2003
    #2
    1. Advertising

  3. Gönen EREN

    Gönen EREN Guest

    Will i able to use it like
    <CustomControl:CustomPanel id="xxx" runat=server [...]>
    Adding here whatever i want to be displayed in the custom panel
    including datagrid label ...
    </CustomControl:CustomPanel>
     
    Gönen EREN, Aug 16, 2003
    #3
  4. Gönen EREN

    Teemu Keiski Guest

    Sure, in that case control is specified using ParseChildren attribute that
    it maps the inner content as child controls not to its properties (as is
    default for WebControl)

    All these things are discussed in MSDN documentation about building server
    controls and in MSPress's book "Developing ASP.NET Server Controls and
    Components". You might also want to check Building Controls forum at ASP.NET
    Forums, www.asp.net/forums

    --
    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy
    http://www.mansoft.fi

    AspInsiders Member, www.aspinsiders.com
    ASP.NET Forums Moderator, www.asp.net
    AspAlliance Columnist, www.aspalliance.com


    "Gönen EREN" <> wrote in message
    news:...
    > Will i able to use it like
    > <CustomControl:CustomPanel id="xxx" runat=server [...]>
    > Adding here whatever i want to be displayed in the custom panel
    > including datagrid label ...
    > </CustomControl:CustomPanel>
    >
    >
     
    Teemu Keiski, Aug 17, 2003
    #4
  5. Gönen EREN

    Gönen EREN Guest

    ok. thanks for your help =)
     
    Gönen EREN, Aug 18, 2003
    #5
    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. Charles Zhang
    Replies:
    3
    Views:
    1,111
    Walter Wang [MSFT]
    Oct 9, 2006
  2. Ulf Meinhardt
    Replies:
    0
    Views:
    617
    Ulf Meinhardt
    Jul 7, 2009
  3. Robin Wenger
    Replies:
    0
    Views:
    2,939
    Robin Wenger
    Aug 18, 2011
  4. Matt Sokol
    Replies:
    2
    Views:
    391
    Theo Tillotson
    Aug 7, 2003
  5. PHP2
    Replies:
    4
    Views:
    124
Loading...

Share This Page