Getting Started — ASP.NET User Controls
In addition to using HTML and Web server controls, you can create custom, reusable controls using the same techniques you use for ASP.NET Web pages. These controls are called user controls.
While you need to choose a single language when authoring a user control, you can include multiple user controls—each authored in a different language—in a single ASP.NET Web page. For example, you can create one user control in Visual Basic that imports data from an XML file, and create another user control in C# that contains an order form, and include both controls in the same ASP.NET Web page.
You can cache output from a user control independently from the rest of its containing ASP.NET Web page. This technique, called fragment caching, can improve performance for your site. For example, if your user control contains an ASP.NET server control that makes a database request, but the rest of the page contains only literal text and simple code that runs on the server, you can use fragment caching in the user control to increase your application's performance.
The topics in this section provide essential information on working with user controls.
In This Section
Reference
- System.Web.UI.UserControl
-
Describes the events, methods, and properties of the .NET Framework class for user controls.