Could I add component to toolbox in VS2005 WebSite Project?

Discussion in 'ASP .Net' started by alberthung01@gmail.com, Jul 24, 2007.

  1. Guest

    Hi all,
    I wrote a component with ComponentDesigner
    to let users drag and drop it to WebPage from toolbox directly.
    Just like the behavior of dataAdapter.
    But it works fine on ASP.NET 1.1 but not on ASP.NET 2.0.
    Sometimes I add it to toolbox in VS2005 WebSite Project but it will
    not appear.
    And always it can't be drag and drop to WebPage any more.
    Nothing will be added to page after that.

    Here is my code structure
    ---------------------------------------
    //Class
    [ToolboxItemFilter("System.Web.UI",ToolboxItemFilterType.Require),
    Designer(typeof(Ares.Workflow.WebControls.AFWebUIControlDesigner))
    ]
    public class AFWebUIControl : System.ComponentModel.Component
    {
    public AFWebUIControl()
    {
    }
    }

    //Designer
    public class AFWebUIControlDesigner : ComponentDesigner
    {
    public override void Initialize(IComponent component)
    {
    base.Initialize(component);
    }
    }
    ---------------------------------------

    Any help will be appreciated.

    Albert
     
    , Jul 24, 2007
    #1
    1. Advertising

  2. Albert,

    This one got me for a little while too. Microsoft changed some Visual Studio
    functionality when they went to Visual Studio 2005.

    In the previous version you could drag a component control onto a page (in
    design view) and the Component Designer window would appear at the bottom of
    the page.

    In Visual Studio 2005 the component designer has been separated from the
    display page. Component Designer objects won't even appear in the toolbox
    unless the new component designer window has been displayed first. To do so:
    Go to the design view of one of your pages and then in the menu go to
    View - Component Designer. Like magic your toolbox should now contain your
    component and let you drag it to the designer.

    Regards,

    --
    S. Justin Gengo, MCP
    justin@aboutfortunate[-NoSpam-].com

    Free code library at:
    www.aboutfortunate.com




    <> wrote in message
    news:...
    > Hi all,
    > I wrote a component with ComponentDesigner
    > to let users drag and drop it to WebPage from toolbox directly.
    > Just like the behavior of dataAdapter.
    > But it works fine on ASP.NET 1.1 but not on ASP.NET 2.0.
    > Sometimes I add it to toolbox in VS2005 WebSite Project but it will
    > not appear.
    > And always it can't be drag and drop to WebPage any more.
    > Nothing will be added to page after that.
    >
    > Here is my code structure
    > ---------------------------------------
    > //Class
    > [ToolboxItemFilter("System.Web.UI",ToolboxItemFilterType.Require),
    > Designer(typeof(Ares.Workflow.WebControls.AFWebUIControlDesigner))
    > ]
    > public class AFWebUIControl : System.ComponentModel.Component
    > {
    > public AFWebUIControl()
    > {
    > }
    > }
    >
    > //Designer
    > public class AFWebUIControlDesigner : ComponentDesigner
    > {
    > public override void Initialize(IComponent component)
    > {
    > base.Initialize(component);
    > }
    > }
    > ---------------------------------------
    >
    > Any help will be appreciated.
    >
    > Albert
    >
     
    S. Justin Gengo, Jul 25, 2007
    #2
    1. Advertising

  3. Guest

    On 7 26 , 12 33 , "S. Justin Gengo" <justin@aboutfortunate[-
    NoSpam-].com> wrote:
    > Albert,
    >
    > This one got me for a little while too. Microsoft changed some Visual Studio
    > functionality when they went to Visual Studio 2005.
    >
    > In the previous version you could drag a component control onto a page (in
    > design view) and the Component Designer window would appear at the bottom of
    > the page.
    >
    > In Visual Studio 2005 the component designer has been separated from the
    > display page. Component Designer objects won't even appear in the toolbox
    > unless the new component designer window has been displayed first. To do so:
    > Go to the design view of one of your pages and then in the menu go to
    > View - Component Designer. Like magic your toolbox should now contain your
    > component and let you drag it to the designer.
    >
    > Regards,
    >
    > --
    > S. Justin Gengo, MCP
    > justin@aboutfortunate[-NoSpam-].com
    >
    > Free code library at:www.aboutfortunate.com
    >
    > <> wrote in message
    >
    > news:...
    >
    >
    >
    > > Hi all,
    > > I wrote a component with ComponentDesigner
    > > to let users drag and drop it to WebPage from toolbox directly.
    > > Just like the behavior of dataAdapter.
    > > But it works fine on ASP.NET 1.1 but not on ASP.NET 2.0.
    > > Sometimes I add it to toolbox in VS2005 WebSite Project but it will
    > > not appear.
    > > And always it can't be drag and drop to WebPage any more.
    > > Nothing will be added to page after that.

    >
    > > Here is my code structure
    > > ---------------------------------------
    > > //Class
    > > [ToolboxItemFilter("System.Web.UI",ToolboxItemFilterType.Require),
    > > Designer(typeof(Ares.Workflow.WebControls.AFWebUIControlDesigner))
    > > ]
    > > public class AFWebUIControl : System.ComponentModel.Component
    > > {
    > > public AFWebUIControl()
    > > {
    > > }
    > > }

    >
    > > //Designer
    > > public class AFWebUIControlDesigner : ComponentDesigner
    > > {
    > > public override void Initialize(IComponent component)
    > > {
    > > base.Initialize(component);
    > > }
    > > }
    > > ---------------------------------------

    >
    > > Any help will be appreciated.

    >
    > > Albert- -

    >
    > - -


    Hi Justin,
    Thanks for your help!
    It works now after I remove the ToolboxItemFilter and display the
    Component Designer.
    Really magic!

    Best Regards,
    Albert
     
    , Jul 26, 2007
    #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. David Hearn

    VS2005 Toolbox Issues

    David Hearn, Sep 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,086
    david-316
    Dec 8, 2007
  2. Arthur Dent
    Replies:
    0
    Views:
    388
    Arthur Dent
    Jan 11, 2006
  3. Rob Dob
    Replies:
    2
    Views:
    836
    Rob Dob
    May 23, 2006
  4. Nick Gilbert

    Add project to VS2005 website

    Nick Gilbert, Aug 23, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,412
    Steven Cheng[MSFT]
    Aug 24, 2006
  5. Rob Dob
    Replies:
    2
    Views:
    454
    Rob Dob
    May 23, 2006
Loading...

Share This Page