Visual Studio does not handle correctly the control

Discussion in 'ASP .Net Web Controls' started by Seduto, Mar 22, 2005.

  1. Seduto

    Seduto Guest

    Hi all,
    I have build a custom webcontrol. It works fine.
    The control has other controls inside.

    [ToolboxData("<{0}:Navigation runat=server></{0}:Navigation>")]
    [ParseChildren(false)]
    public class Navigation: BaseControl, INamingContainer
    {


    As long as I edit directly the page aspx everything work. When I modified
    any proprty of the control from the property edit Visual Studio delete
    everything inside the control.

    Any idea how to fix this problem?

    Thank you.
     
    Seduto, Mar 22, 2005
    #1
    1. Advertising

  2. Seduto

    Teemu Keiski Guest

    Hi,

    to clarify, do you allow adding child controls to this one via VS.NET
    design interface?

    If that's the case I suppose that you should also have PersistChildren(true)
    so that designer persists child controls as nested inner controls. Second
    thing is that you might want to have some sort of designer for your control
    (unless you don't already have). Panel has a PanelDesigner which derives
    from ReadWriteControlDesigner (such is needed when adding child controls
    into a control via design drag/drop interface like with Panel)

    --
    Teemu Keiski
    ASP.NET MVP, Finland


    "Seduto" <> wrote in message
    news:...
    > Hi all,
    > I have build a custom webcontrol. It works fine.
    > The control has other controls inside.
    >
    > [ToolboxData("<{0}:Navigation runat=server></{0}:Navigation>")]
    > [ParseChildren(false)]
    > public class Navigation: BaseControl, INamingContainer
    > {
    >
    >
    > As long as I edit directly the page aspx everything work. When I modified
    > any proprty of the control from the property edit Visual Studio delete
    > everything inside the control.
    >
    > Any idea how to fix this problem?
    >
    > Thank you.
    >
     
    Teemu Keiski, Mar 22, 2005
    #2
    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. wh
    Replies:
    2
    Views:
    553
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. Thirumalai
    Replies:
    0
    Views:
    711
    Thirumalai
    May 22, 2006
  3. rockdale
    Replies:
    1
    Views:
    650
    Juan T. Llibre
    Aug 23, 2006
  4. xman
    Replies:
    0
    Views:
    543
  5. xman
    Replies:
    1
    Views:
    640
    Victor Bazarov
    Aug 17, 2005
Loading...

Share This Page