User Tools

Site Tools


notes:asp.net:directives

ASP.NET Directives

These are commonly used ASP.NET directives:

Import a namespace:

<%@ Import namespace="System.Drawing" %>

Register a user control:

<%@ Register TagPrefix="uc" TagName="MyUserControl" Src="~/UserControls/MyUserControl.ascx" %>

Register a custom web control:

<%@ Register TagPrefix="wbs" Namespace="WBS.CustomControls" Assembly="WBS.CustomControls" %>

Declare a user control:

<%@ Control Language="C#" AutoEventWireup="true" 
    CodeFile="MyUserControl.ascx.cs" Inherits="WBS.UserControls.MyUserControl" %>
notes/asp.net/directives.txt · Last modified: 2016/04/20 by admin