Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUserControlsUserControls
Previous
 
Next
New Post
3/4/2012 6:35 PM
 

Hi all

I have been trawling various forums for days trying to resolve an issue!!

I am building a module which has many UserControls but within VS2010 I am getting the following error:

Element 'ContactsAdd' is not a known Element. This can occur if there is a compilation error in the website or the web.config file is missing.

This line it refers to is:

<uc2:ContactsAdd ID="ContactsAdd1" runat="server" /> 
This seems to be happening on all of my UC's. Any ideas?


Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
New Post
3/4/2012 9:44 PM
 

Mark,

I am by no means a module developer guru, but I wanted to offer a suggestion.  I would look at the video library here on this site under the development tab for some ideas. Chris Hammond has put out a lot of videos on creating modules and I think you may find one there that helps you solve your issue.


 
New Post
3/4/2012 10:37 PM
 

Hello,

That error usually means that there is no reference to the user control on the page. In other words, the page where you're using the control doesn't know what uc2:ContactsAdd is because it hasn't been referenced.

Add a line like this to the top of the page to add a reference:

<%@ Register TagPrefix="uc2" TagName="ContactsAdd" Src="MyControls/ContactsAdd.ascx" %> 

Of course, replace "MyControls" with the path to your control.

Note that some controls may not have the same paths in your compilation as they will in the production environment. 

Mike


 
New Post
3/5/2012 7:04 AM
 

Hi Mike

I do have the relevant Register Reference in place:

<%@ Register src="miniControls/ContactsAdd.ascx" tagname="ContactsAdd" tagprefix="uc2" %> 
I did find a forum post/blog somewhere that stated that the System.Web.Extensions namespace is not necessary when using 4.0 Framework. But with so many reference to the Namespace in web.config, I feel that this probably isn't the case for a DNN installation.

What I am doing to test my controls, is using Open Smart on a local and live environment. Does that make any difference?


Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
New Post
3/5/2012 8:17 AM
 

I have also discovered that I cannot reference the UC's in the CodeBehind! Says they have a protection level issue!!

Maybe that extra information may help


Mark Cooney
Programmer
Ely, Cambridgeshire
07767150058
CambsCreative
mark@cambscreative.co.uk

Visit Ely City Website
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUserControlsUserControls


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out