Web Tutorials

Interview Q & A

Code Examples

Utility Tools

ASP.NET Import Directive Attributes

ASP.NET import directive is used at page level (.aspx file) and is used by the ASP.NET page parser and compiler.

Syntax

<%@ Import attribute="value" [attribute="value"...] %>    

ASP.NET Import Directive Attributes Example C#

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="ystem.Xml.Linq" %>

RequiredFieldValidator

RegularExpressionValidator

RangValidator

CompareValidator

CustomValidator

ValidationSummary