Is it possible to register a complete namespace of usercontrols in an aspx-File, instead of each control seperately?
I have created a bunch of usercontrols and collected them into an own namespace "MyWebControls", like this:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LevelFilter.ascx.cs" Inherits="MyWebControls.LevelFilter" %>
Codebehind:
namespace MyWebControls
{
public partial class LevelFilter : System.Web.UI.UserControl
{
...
}
}
What I tried now to include them in my pages (and what did not work):
<%@ Register Namespace="MyWebControls" TagPrefix="ucs" %>
...
<ucs:LevelFilter />
Is there any way to do this? Apparently it works with external assemblies like AjaxControlToolkit, so I guess this should be possible.
I am using ASP.NET 4.0.