Calling a secondary UserControl applet

Calling a secondary UserControl applet

I call my applet in C# with this code:
 <object id=t
classid="http:WindowsControlLibrary1.dll#WindowsControlLibrary1.UserControl1"
height=768 width=1024 VIEWASTEXT >
 </object >
It's working. In this UserControl applet I have a button, and when I click on this button I want to call another UserControl. How can I do that?

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchWinDevelopment.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinDevelopment.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

I would recommend making the second control a constituent control hosted on the first user control so that you would have access to the second user control from within the first. Just envision your control as being a .NET control such as the ListView and work with it just as you would if it were hosted upon a Form.

If I am missing the point of you question, and you are trying to embed separate controls in a Web page instead of building them into each other, perhaps passing a reference of the first to the second control using a method or property.

This was first published in October 2004