c# - Using assemblies registered in Web.Config in files not in root folder -


I have my web A control is registered in the config file and for control. Dll is placed in the application bin folder.

  & lt; Compilation debug = "true" & gt; & Lt; Assemblies & gt; & Lt; Add assembly = "System.Web.Extensions, version = 1.0.61025.0, culture = neutral, public token = 31BF3856AD364E35" /> & Lt; Add Assembly = "Rich Text Editor" /> & Lt; / Assemblies & gt; & Lt; / Compilation & gt; & Lt; Pages & gt; & Lt; Control & gt; & Lt; Add Assembly = "Rich Text Editor" Namespace = "Rich Text Editor" tagfix = "CC1" /> & lt; / Control & gt; & Lt; / Pages & gt;  

Now I can use this control in the .aspx pages in the root folder without problems. However, I want to use this control. Some of the .aspx pages are stored in the application sub-folder (in this case a sub-folder called "admin"). When I try to use these controls in these pages and go into debug, I get an error:

  Error 1 Unknown server tag 'cc1: RichTextEditor' N: \ IntranetV2 \ Administrator \ EditMenuItem.aspx 27  

I'm sure I'm missing something simple here but I do not have to figure out how to do it and googling

UPDATE:

OK I have not considered Aaron's solution to be a fate, I have suggested code The amendment does:

  & lt; Add tagPrefix = "cc1" tagname = "RichTextEditor" src = "~ / Bin / RichTextEditor.dll" />  

I hope all of this will be needed, but I get an error now:

  No Build Provider registered for Error 1 Extension. Dll '. You can & lt; Collections & gt; & Lt; Build provider & gt; One can register in Section in Machine.config or web.config Make sure that there is a BuildProviderAppliesToAttribute attribute in which the value contains 'Web' or 'All'  

Please help! I know that the answer should be ridiculously ridiculous, but I'm getting mad that I'm trying to fix it and Google has not helped anymore.

I had problems like a while ago. The only way I was working on control was something like this:

  & lt; Add tagPrefix = "cc1" tagName = "RichTextEditor" src = "~ / controls / richtexteditor.ascx" & gt;  

Instead of:

  & lt; Adding assembly = "rich text editor" namespace = "rich text editor" tagfix = "cc1" />  

Edit:

Since you are using a binary, add .dll to your solution, and a reference to it Add that project, where you are using it, .NET will add .dll to your bin folder, then go back to it (and verify that the namespace and assembly are correct):

  & Lt; Adding assembly = "Rich Text Editor" namespace = "Rich Text Editor" tag =  < Div>  

Comments