Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Could I add component to toolbox in VS2005 WebSite Project?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alberthung01@gmail.com - 24 Jul 2007 10:35 GMT
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 - 25 Jul 2007 17:33 GMT
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,

Signature

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

Free code library at:
www.aboutfortunate.com

> Hi all,
> I wrote a component with ComponentDesigner
[quoted text clipped - 32 lines]
>
> Albert
alberthung01@gmail.com - 26 Jul 2007 03:40 GMT
On 7 26 ,   12 33 , "S. Justin Gengo" <justin@aboutfortunate[-
NoSpam-].com> wrote:
> Albert,
>
[quoted text clipped - 62 lines]
>
> -         -

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

Best Regards,
Albert

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.