ASP.NET 2.0 Web Custom Control example

Discussion in 'ASP .Net Building Controls' started by Amelyan, Nov 13, 2005.

  1. Amelyan

    Amelyan Guest

    I need to create web custom control that can contain any type of control as
    a child (similar to asp:panel control). However, when I try to include
    children in my web control on aspx page, it says 'Content is not allowed
    between the opening and closing tags for element'.

    Does any one have an example of how to build this simple web custom control?

    Thanks,
    Amelyan, Nov 13, 2005
    #1
    1. Advertising

  2. Amelyan

    Sundararajan Guest

    HI,
    please refer to the link
    http://msdn2.microsoft.com/library/zt27tfhy(en-us,vs.80).aspx for the ASP.Net
    2.0 custom control.

    I hope that the source of the problem might be in the
    ToolboxData("<{0}:customrunat=server></{0}:custom>") attribute added to ur
    custom control class.

    however it would be better if u can send the code of ur custom control
    across..

    regards,
    --
    S.Sundararajan


    "Amelyan" wrote:

    > I need to create web custom control that can contain any type of control as
    > a child (similar to asp:panel control). However, when I try to include
    > children in my web control on aspx page, it says 'Content is not allowed
    > between the opening and closing tags for element'.
    >
    > Does any one have an example of how to build this simple web custom control?
    >
    > Thanks,
    >
    >
    >
    >
    Sundararajan, Nov 14, 2005
    #2
    1. Advertising

  3. Here is an example of such a control.
    The full source code is freely available along with the article detailing
    the design:
    http://www.aspnetpro.com/NewsletterArticle/2005/12/asp200512so_l/asp200512so_l.asp

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


    "Amelyan" <> wrote in message
    news:...
    >I need to create web custom control that can contain any type of control as
    >a child (similar to asp:panel control). However, when I try to include
    >children in my web control on aspx page, it says 'Content is not allowed
    >between the opening and closing tags for element'.
    >
    > Does any one have an example of how to build this simple web custom
    > control?
    >
    > Thanks,
    >
    >
    >
    Steve C. Orr [MVP, MCSD], Nov 14, 2005
    #3
    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. AleXmanFree
    Replies:
    3
    Views:
    554
    Hillbilly
    Oct 9, 2008
  2. Matt Sokol
    Replies:
    2
    Views:
    365
    Theo Tillotson
    Aug 7, 2003
  3. Houda Tahbaz

    An example for creating a web custom control with full design view.

    Houda Tahbaz, Nov 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    143
    Scott Mitchell [MVP]
    Nov 14, 2004
  4. Pete Mahoney

    ASP.Net Server Control (Web Custom Control) Code Update Problem

    Pete Mahoney, Sep 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    176
  5. Srikar
    Replies:
    1
    Views:
    118
    Brock Allen
    Apr 19, 2005
Loading...

Share This Page