locked
Ajax Editor showing error RRS feed

  • Question

  • User-2074858223 posted

     

     <cc1:Editor ID="txtEditor" runat="server"  CssClass="form-control" Width="100%" BackColor="WhiteSmoke" Height="400px" Font-Names="Comic Sans MS"/>
    
    
    

    CODE

     protected void btnSubmit_Click(object sender, EventArgs e)
        {
            lblContents.Text = txtEditor.Text;
        }
    }

    ERROR

    Error	21	'AjaxControlToolkit.HTMLEditor.Editor' does not contain a definition for 'Text' and no extension method 'Text' accepting a first argument of type 'AjaxControlToolkit.HTMLEditor.Editor' could be found (are you missing a using directive or an assembly reference?)	C:\Users\migold\Documents\Visual Studio 2013\WebSites\HORNTIMESITE\ComposeMail.aspx.cs	34	38	HORNTIMESITE(1)
    
    
    

    Sunday, March 27, 2016 8:21 PM

Answers

  • User2103319870 posted

    Use Content Property of HTML Editor instead of Text.  The HTML Editor Content property is used to retrieve the HTML content entered into the HTML Editor.

     protected void btnSubmit_Click(object sender, EventArgs e)
            {
                lblContents.Text = txtEditor.Content;
            }

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 27, 2016 11:06 PM