The control directive is used with the user controls and appears in the user control (.ascx) files.
The basic syntax of Control directive is:
<%@ Control Language="C#" EnableViewState="false" %>
The attributes of the Control directive are:
| Attributes | Description |
|---|---|
| AutoEventWireup | The Boolean value that enables or disables automatic association of events to handlers. |
| ClassName | The file name for the control. |
| Debug | The Boolean value that enables or disables compiling with debug symbols. |
| Description | The text description of the control page, ignored by compiler. |
| EnableViewState | The Boolean value that indicates whether view state is maintained across page requests. |
| Explicit | For VB language, tells the compiler to use option explicit mode. |
| Inherits | The class from which the control page inherits. |
| Language | The language for code and script. |
| Src | The filename for the code-behind class. |
| Strict | For VB language, tells the compiler to use the option strict mode. |