RE: using TagPrefix to avoid having @ Register directives on pages using custom controls

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Shan,

Welcome to ASPNET newsgroup.
Regarding on the Registering Custom control prefix problem, based on my
research, I'm afraid this is limited by the currently ASP.NET page/control
parsing model. For those buildin controls ( with "ASP" prefix), they're
registered internally when parsing the Page and Controls. And there hasn't
provide any configuration elements for registering custom control in
web.config or machine.config. Currently we can only declare assembly
referencing in web.config / machine.config through the
compilation/assemblies element like:

<system.web>
..............
<compilation>
<assemblies>
<add assembly="ADODB"/>
<add assembly="*"/>
</assemblies>
</compilation>
</system.web>

which can replace the @ Assembly directive in aspx page.
But for @Register, currently we have to always declare it in aspx for our
custom controls.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

.