June 15, 2010 by Christoff Truter C# ASP.NET
Generally when adding/dropping an user/custom control to a page, we use/used to use the @Register directive to reference our controls (or the IDE did it for you), like this:
...
<%@ Register Src="Controls/SomeControl.ascx" TagName="SomeControl" TagPrefix="cstruter" %>
<%@ Register Assembly="ServerControl" Namespace="ServerControl" TagPrefix="somevendor" %>
...
<body>
<form id="form1" runat="server">
<div>
<cstruter:SomeControl ID="SomeControl1" runat="server" />
<somevendor:ServerControl1 ID="ServerControl11" runat="server" />
</div>
</form>
...
<system.web>
...
<pages>
<controls>
...
<add src="~/Controls/SomeControl.ascx" tagName="SomeControl" tagPrefix="cstruter" />
<add assembly="ServerControl" namespace="ServerControl" tagPrefix="somevendor" />
...
July 8, 2010
Encrypting your web.configJune 18, 2008