Re: How to reference custom control from App_Code folder?
- From: "Teemu Keiski" <joteke@xxxxxxxxxxxxxxx>
- Date: Mon, 6 Feb 2006 18:50:08 +0200
If you reference it from App_Code you need to omit the Assembly part of the
Regioster directive, since it's not in an named assembly.
<%@ Register TagPrefix="Fred" Namespace="FredECommerceControls" %>
E.g just have TagPrefix and the namespace declared.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Alan Silver" <alan-silver@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:QUeMD+Fv425DFwdT@xxxxxxxxxxxxxxxxxxxxxx
Hello,
I have a custom control that is inside a DLL. Until now, I have had the
source file for this DLL in a development folder on my machine, and I've
been compiling it using csc on the command line. I reference the control
in the DLL on a master page by adding the line to the top of the file...
<%@ Register TagPrefix="Fred" Namespace="FredECommerceControls"
Assembly="ECommControls" %>
...and then something like this where I want the control...
<Fred:SiteLinks PreSep="" runat="server" />
This all worked fine, but didn't let me debug the control in VWD as it
didn't have the source file.
I tried creating an App_Code folder and putting the source file in there
(deleting the DLL from the bin folder), but this gave the following error
when I tried to run the page...
Element 'SiteLinks' is not a known element. This can occur if there is a
compilation error in the Web site.
I presume that it's not compiling the source file, so it can't find the
assembly containing the control. The question is, why? I thought the whole
idea of putting the source file in App_Code was so that it would
automatically be compiled.
Anyone any ideas? TIA
--
Alan Silver
(anything added below this line is nothing to do with me)
.
- Follow-Ups:
- Re: How to reference custom control from App_Code folder?
- From: Alan Silver
- Re: How to reference custom control from App_Code folder?
- References:
- How to reference custom control from App_Code folder?
- From: Alan Silver
- How to reference custom control from App_Code folder?
- Prev by Date: flash embedded in C#
- Next by Date: The compiler failed with error code 2000
- Previous by thread: How to reference custom control from App_Code folder?
- Next by thread: Re: How to reference custom control from App_Code folder?
- Index(es):
Relevant Pages
|