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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...DNN7 - Adding a richtext editor to a module will not compileDNN7 - Adding a richtext editor to a module will not compile
Previous
 
Next
New Post
5/14/2013 10:35 AM
 

We are trying to create a DNN module that includes a rich text editor so our end users can enter/edit html content.

However, when we add code to reference the “text” property of our texteditor control  (or any property for that matter) we get the following compile error:
“'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?)”

Below is code to a sample module we created to reproduce this error.

Code from our  .ascx page (ucTestEditor_Test.axcx)
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucTextEditor_Test.ascx.cs" Inherits="rc.TextEditor_Test.ucTextEditor_Test" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke.Web" Namespace="DotNetNuke.Web.UI.WebControls" %>
  <div style="padding: 1px 1px 1px 1px;">  
       <dnn:TextEditor ID="teRSummary" runat="server" Width="100%" Height="300px" cssclass="Normal" Enable="true"/><br/>
  </div>
  <div class="dnnFormItem" style="padding: 5px 5px 5px 5px;"> 
     <asp:Label ID="Label1" runat="server" Text=" "></asp:Label>
  </div>
  <div class="dnnFormItem" style="padding: 3px 3px 3px 3px; font-size: 12pt; font-family: Verdana, sans-serif; font-weight:normal; color:#002d62; text-decoration:double;">
      <asp:Button ID="Submit" runat="server" Text="Submit" OnClick="Submit_Click" /> 
  </div>

Code from our .cs page (ucTestEditor_Test.axcx.cs)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using DotNetNuke.Entities.Modules;

namespace rc.TextEditor_Test
{
    public partial class ucTextEditor_Test : PortalModuleBase
    {
       public string CssClass { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Label1.Text = "";
            }
        }
        protected void Submit_Click(object sender, EventArgs e)
        {
                Label1.Text = "teRSummary :" + teRSummary.Text;
        }
    }
}

All references within the project appear to be correct.

Any info on a solution to this problem would be appreciated.

Thanks

Lee

 
New Post
5/14/2013 2:15 PM
 

We tried to resolve this issue for 3 days.  I posted my question and then figured it out 10 minutes later!

Solution: http://bestvisualization.blogspot.com...

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...DNN7 - Adding a richtext editor to a module will not compileDNN7 - Adding a richtext editor to a module will not compile


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