ASP.NET Controls - Part Two
page 2 of 5
by Devarticles.com
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 21782/ 98

Custom Control vs. Components

It's time to introduce custom controls and components. Custom controls provide programmers with reusable HTML outputting code that involves a small amount of processing. They are accessed through a web page (.aspx), using custom tags, just like user controls. All server controls can be thought of as custom controls that have been pre-made by Microsoft.

Components on the other hand provide programmers with reusable application logic that involves some fairly intensive processing. They are accessible from a code behind page or between <script> and </script> tags in a web page. All base classes and objects developed by Microsoft can be considered pre-made components.

Although both custom controls and components can do exactly the same things, their uses will become clearer as you have more experience with them. For example, you could make a menu bar using components and load a method in a component that makes the menu load in the Page_Load class, but it is much easier to use custom controls in an aspx page as custom tags, and place them wherever we want the menu to appear.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2019 ASPAlliance.com  |  Page Processed at 2019-08-18 5:03:22 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search