Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Shan McArthur #1
using TagPrefix to avoid having @ Register directives on pages using custom controls
Hello,
I am designing a custom control in a seperate DLL. I have used the
assembly:TagPrefix attribute in this project. The project is included as a
reference in our website project. I can use my custom control if I have a @
Register directive in my page, but I want to develop this control in a
manner that does not require this directive on each and every page in my
website (and other websites that use this control). Is there any way to
register the control so that this is not required? None of the .net
controls need this special directive.
Thanks,
Shan McArthur
Shan McArthur Guest
-
Using Web.config's <system.web><pages><controls><add /></controls></pages></system.web> To Register UserControls
My Web.config file contains the following section to register some of my UserControls: <pages> <controls> <add tagPrefix="NATE"... -
Can't get TagPrefix to work for custom Web control
Hi I've created a new custom Web control. I have tried to customize the assembly attribute TagPrefix . However, each time I drag my custom control... -
Avoid including @ Register tag on every page
I have written several custom web controls for my aspx pages. In order to use any of them, I need to include the following line of code at the top... -
The lifecycle of ASP.NET pages and custom controls
Reading this at the moment http://www.pcquest.com/content/coding/103050501.asp "Billy Porter" <billy@xymox.com> wrote in message... -
Why doesnt custom TagPrefix work in controls made w/ VBNET?
I cannot get the custom Tag Prefix to work in controls made w/ VBNET. Why??? It works just fine in controls made w/ c#. Is vbnet just buggy? -
Steven Cheng[MSFT] #2
RE: using TagPrefix to avoid having @ Register directives on pages using custom controls
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! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Steven Cheng[MSFT] Guest
-
Michael Baltic #3
RE: using TagPrefix to avoid having @ Register directives on pages
If you look at custom controls written by other companies, you will see that
they write out the @Register tag as well.
With the Infragistics components, if I drag a UltraWebGrid from the toolbox
onto my webform, the @Register tag is autogenerated for me. In addition, the
license file in my web project's root is updated.
If you have access to the source of a 3rd party control, or google, you
could probable find a way to automate this process for yourself as well.
--
Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
Future Business Model - National City Mortgage
"Steven Cheng[MSFT]" wrote:
> 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! [url]www.microsoft.com/security[/url]
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>Michael Baltic Guest



Reply With Quote

