Introducing ActiveX Controls in ASP.NET

ActiveX Controls are software components that are fundamental for the ActiveX technology and perform tasks such as computing and manipulating data and interacting with other programs. ActiveX is sometimes referred to as Component Object Model (COM) components and the .NET equivalent for ActiveX Controls are Windows Forms controls. Therefore as you can make use of COM objects in .NET Framework as if they are .NET objects, you can make use of ActiveX Controls also as if they are Windows Forms controls.

Since .NET Framework uses inheritance concept, it is possible to inherit objects from these controls to any language supported by .NET Framework. Though you can design or create your own controls, you have to inherit from System.Windows.Forms.Control to make use of the services provided by this class. There are some new properties that you cannot view in Visual Basic but can see in Visual Basic.NET. They are accessible description, accessible name, anchor, and dock. If these are the newly added ones, then there are some ActiveX Controls such as Lines and Shapes that are not available for Windows Forms. Instead of Lines and Shapes, in .NET you can use GDI+ library.

ActiveX Controls also have some properties that are commonly known as extender properties such as Left, Right, and Visible. The Windows Forms engine replaces these extender properties with its own set of properties. Thus, Windows Forms now have both extender properties and inherited properties. The Windows Forms engine replaces the extender properties by creating a wrapper for each of the ActiveX control. This wrapper is then used to combine the ActiveX extender properties with the new Windows Forms properties.

When you want to use the ActiveX Controls in .NET applications you can do so either by adding a reference or by adding an ActiveX control to the toolbox. By adding a reference it creates a wrapper and then you can instantiate objects using the wrapper. If you follow this method then the ActiveX control will be running in the server. If you want to add the ActiveX control using Visual Studio.NET then this will create an object tag in HTML and the control will run on the client side.

| What is Private Access Modifier in C#? |Introducing Microsoft SQL Server 2000 Desktop Engine | What is Protected Access Modifier in C#? | What is Protected Internal Access Modifier in C#? | What is Public Access Modifier in C#? | What is the difference between virtual and abstract keywords in .NET? | What is the importance of Microsoft Application Blocks in .NET Architecture? | What is the need for Factory Method in C# | What is the purpose of ArrayList in .NET? | What is the purpose of Datareader in ADO.NET? | What is the purpose of Dataset in ADO.NET? | What is the purpose of finally block in C#? | What is the purpose of interlocked class in .NET? | What is the purpose of main() function in C# | What is the purpose of ManualResetEvent in .NET? | What is the purpose of sealed method in C#? | What is the purpose of Thread.Join() method in .NET? | What is the purpose of Thread.Sleep() method in .NET? | What is the purpose of throw keyword in C#? | What is the usage of ENUM in .NET? |


“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.