Facade for 3rd party controls, CompositeControl?

Discussion in 'ASP .Net Building Controls' started by Mark, Aug 1, 2008.

  1. Mark

    Mark Guest

    Hi...

    Kind of a typical request from product management - they want to be able to
    swap in different 3rd party controls depending on their whim and the day. In
    this case, they want to support FreeTextBox and Cute Editor interchangably.

    I've been trying to put together a container control derived from
    CompositeControl to put a facade around the interaction. Depending on the
    configuration, I want to put a FreeTextBox2 or a cute editor control into the
    ControlCollection.

    I overrode CreateChildControls() to set things up. That seems to get the
    controls created and initialized, but not rendered.

    I overrode my CompositeControl.Render() method to render the child, but
    FreeTextBox2 (my first test case) has some member variables that are only
    initialized in FreeTextBox2.OnPreRender(), which apparently hasn't been
    called.

    I tried to override my CompositeControl.OnPreRender() but since
    OnPreRender() is protected, I can't call my child FreeTextBox2.OnPreRender().

    Am I just barking up the wrong tree here? What is the best way to make a
    shell container just to hold another container of choice? How do you get the
    controls in the collection hooked up to get all of the various calls in the
    stages of execution?

    Thanks
    Mark
     
    Mark, Aug 1, 2008
    #1
    1. Advertisements

  2. Hi Mark,

    Regarding on this issue, I've also seen your another thread posted in the
    microsoft.public.dotnet.framework.aspnet newsgroup.

    I've also added some inputs there. Welcome to continue followup there.

    Sincerely,

    Steven Cheng
    Microsoft MSDN Online Support Lead

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >X-WBNR-Posting-Host: 207.46.192.207
    >From: =?Utf-8?B?TWFyaw==?= <>
    >Subject: Facade for 3rd party controls, CompositeControl?
    >Date: Fri, 1 Aug 2008 11:15:01 -0700


    >
    >Hi...
    >
    >Kind of a typical request from product management - they want to be able

    to
    >swap in different 3rd party controls depending on their whim and the day.

    In
    >this case, they want to support FreeTextBox and Cute Editor interchangably.
    >
    >I've been trying to put together a container control derived from
    >CompositeControl to put a facade around the interaction. Depending on the
    >configuration, I want to put a FreeTextBox2 or a cute editor control into

    the
    >ControlCollection.
    >
    >I overrode CreateChildControls() to set things up. That seems to get the
    >controls created and initialized, but not rendered.
    >
    >I overrode my CompositeControl.Render() method to render the child, but
    >FreeTextBox2 (my first test case) has some member variables that are only
    >initialized in FreeTextBox2.OnPreRender(), which apparently hasn't been
    >called.
    >
    >I tried to override my CompositeControl.OnPreRender() but since
    >OnPreRender() is protected, I can't call my child

    FreeTextBox2.OnPreRender().
    >
    >Am I just barking up the wrong tree here? What is the best way to make a
    >shell container just to hold another container of choice? How do you get

    the
    >controls in the collection hooked up to get all of the various calls in

    the
    >stages of execution?
    >
    >Thanks
    >Mark
    >
    >
     
    Steven Cheng [MSFT], Aug 4, 2008
    #2
    1. Advertisements

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Aaron
    Replies:
    2
    Views:
    441
    Natty Gur
    Aug 14, 2003
  2. Darren Clark
    Replies:
    2
    Views:
    480
    David Krussow
    Apr 10, 2004
  3. Max
    Replies:
    1
    Views:
    467
  4. Cirene
    Replies:
    6
    Views:
    2,671
    Eliyahu Goldin
    May 14, 2008
  5. Mark
    Replies:
    6
    Views:
    1,168
    Steven Cheng [MSFT]
    Aug 7, 2008
  6. Dave

    sources for 3rd party controls?

    Dave, Sep 2, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    244
  7. /dev/null

    3rd party grid controls, suggest some

    /dev/null, Aug 25, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    276
    Jorge
    Aug 31, 2005
  8. GS
    Replies:
    2
    Views:
    655
Loading...