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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Trouble with WAP module starter kit -- canTrouble with WAP module starter kit -- can't resolve dnn:TextEditor, getting build errors
Previous
 
Next
New Post
9/4/2008 11:13 AM
 

I went through Michael Washington's tutorial on DNN 4 module development, and successfully created a quiz module that did what I needed.

Now, I want to convert my module to the WAP project-style, and the first thing I did was get the starter kit and verify that the basic module that it gives you is working correctly.  Indeed everything works fine.

I then set about changing the namespaces (everything is in the "YourCompany" namespace by default).  I started with the UserControls--the View control, Settings control, and Edit control.  View and Settings control went smoothly, and after changing the namespaces the project still built fine and was running in my dev DNN environment.

But after changing the namespace declarations on the Edit control (EditTestWapModule.ascx and the .cs files), I started getting build errors like the following:

error CS1061: 'System.Web.UI.UserControl' does not contain a definition for 'Text'
and no extension method 'Text' accepting a first argument of type
'System.Web.UI.UserControl' could be found (are you missing a using directive
or an assembly reference?)

It's complaining about this control:

<dnn:TextEditor id="txtContent" runat="server" height="200" width="500"   />

I noted that in the .designer.cs file, it's declared just as a UserControl--that's not right, is it?

 

        /// <summary>
        /// txtContent control.
        /// </summary>
        /// <remarks>         /// Auto-generated field.         /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>         protected global::System.Web.UI.UserControl txtContent;

 

I also noted that in the .ascx file, there are squiggly lines under the the Src attribute for each of the following:

 

<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/labelcontrol.ascx" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %>

If I hover over them, ithas errors like "File '~/controls/labelcontrol.ascx' was not found."

There is also a squiggly line under "TextEditor" in the "dnn:TextEditor" tag, and hovering over that reveals that "Element 'TextEditor' is not a known element."

So what happens that it appears to have forgotten about all the DNN controls?  I tried changing the namespaces back to "YourCompany" everywhere I changed them, but that didn't do anything.  It seems like when I changed the "Inherits" attribute in EditTestWapModule.ascx, it regenerated the .designer.cs file, and ever since then it has not been able to properly resolve the DNN controls.

 

 
New Post
9/4/2008 1:31 PM
 

This problem can be corrected by going into the .designer.cs file and changing the UserControl fields to the appropriate DNN control type (e.g., the TextEditor control needs to be of type DotNetNuke.UI.UserControls.TextEditor).

The problem, of course, is that everytime I make a change to the .ascx file, the .designer.cs file gets regenerated, and I have to go back into the file and change all the DNN controls to be of the right type again!

What does one do to correct this issue?

 
New Post
9/4/2008 1:33 PM
 

One option, apparently, is to move all the DNN control declarations out of the .designer.cs file and into the .cs file--is that the only workaround we have?

 
New Post
12/13/2008 1:01 PM
 

Joshua -

I assume you found the solution or moved back to WSP by now, but here's the answer I finally found, after about 6 hours of searching, in this blogpost by Ian

Dave

 
New Post
1/8/2009 11:41 AM
 

I hadn't found the solution.  Thanks for posting this.

For reference, here's what Ian said:

In order for Visual Studio to know about your development web site, make sure to set your project to use your IIS server, and set the Override application root URL to the root of your web site.  When you do this, Visual Studio knows that paths starting with "~" are really pointing to the DNN web site, and not just to your project.  This makes it possible to include controls from within the DNN site, like the DNN Label or URL control. 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Trouble with WAP module starter kit -- canTrouble with WAP module starter kit -- can't resolve dnn:TextEditor, getting build errors


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