ASP.NET Controls - Part Two
page 2 of 5
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 23717/ 56

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-2022  |  Page Processed at 2022-09-24 3:05:04 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search