.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

How to use AJAX editor with HTML content?

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net

I have a AJAX editor and I want to put the HTML content in a database and I want to get the HTML data from the database to put in the HTML editor, in HTML mode.

So I do:

Editor1.ActiveMode = AjaxControlToolkit.HTMLEditor.ActiveModeType.Html;
        Editor1.Content = MessageLabel2;

Editor1.ActiveMode = AjaxControlToolkit.HTMLEditor.ActiveModeType.Html;

Editor1.Content = data_from_database;

But what happens is that I get the HTML data from the database in designmode in the editor, so I have HTML in designmode and HTML to HTML in HTMLmode (and that is not what I want of course).

Of course I want only HTML in HTML mode and in designmode I want the normal text.

How can you do this and is this possible?

View Complete Post

More Related Resource Links

Embed Youtube inside Ajax Html Editor- problem



When inserting a simple embed of youtube inside the ajax editor, on firefox and chrome problems occur. On the other hand on internet explorer 8 everything works fine. I found this solution http://www.nopcommerce.com/boards/t/4228/bug-in-ajax-html-editor.aspx . 

My question is where do I find the DesignPanel.pre.js ?


Roderick Vella

Ajax HTML Editor and Timers

Howdy, I have a extended htmleditor in a mainpage and I have a seperate timer in a control that is on the master page to notify the user of messages. Everytime the timer fires, after text has been entered into the htmleditor, focus is automatically pulled to the htmleditor.    If I disable the timer control there is no issue. I have tried wrapping both the timer, with an updatepanel as well as the htmleditor and the other textboxes on the page with updatepanel, here is the updatepanel below. I have even tried the autofocus to false on the htmleditor.  I am using ajax 3.5 and IE8. Anyone got any suggestions? <asp:UpdatePanel ID="uppnlContent" runat="server" UpdateMode="Conditional" RenderMode="Inline"> <ContentTemplate>  

How do I turn off HTML validation in the Content Editor Web Part?

I'm fairly used to SharePoint 2007, where I could inject pretty much whatever I wanted into the CEWP, and among other things affect the page style or create div-based layouts. However, in SharePoint 2010, inserting code into the CEWP seems to go through a HTML validation process, which inserts and converts the original HTML code and ends up in incorrect results. How can I turn off this HTML validation stuff, or alternatively, is there any other way for me to inject HTML into a web part as I wish?

Ajax html editor spell checker


I am using ajax html editor, is it possible to embed a spell checker?

Thanks for the helpful info.




Hello I would like to ask how to submit a new post to tadabase table using HTML Editor? 

The subject will be a normal text box but the body is content of Editor how to declare it??

And one more thing how will looks a code if you want to use a HttpUtility.HtmlEncode(something.Trim()),?

At a moment im using the code like this :

 MembershipUser currentUser = Membership.GetUser();
        Guid currentUserId = (Guid)currentUser.ProviderUserKey;
        // Insert a new record into GuestbookComments
        string connectionString = ConfigurationManager.ConnectionStrings["SecurityTutorialsConnectionString"

AJAX HTML Editor insertHTML() function



I have editor and I want to add a HTML to it with a button from a toolbar. I have been searching through this forum and came up with this, but it does not work:

Here is the code on the .aspx page:

<script type="text/javascript">
        function addHTML() {
            var editor = $find("editor");
            var editPanel = editor.get_editPanel();
            var designPanel = editPanel.get_activePanel();

    <customEditors:MyHtmlEditor ID="editor" runat="server"></customEditors:MyHtmlEditor>

And this is a class for my custom editor:

Public Class MyHtmlEditor
        Inherits Editor

        Protected Overrides Sub FillTopToolbar()

            Dim newBtn As New AjaxControlToolkit.HTMLEditor.ToolbarButton.MethodButton
            newBtn.Attributes.Add("onmouseover", "addHTML();")

Background on html/rich text editor in content editor web part?


Hi All,

Does anyone know what in the CSS controls the background of the rich text/html editor in the Content Editor Web Part?  Mine is picking up the background of my page layout so I must have accidentally changed it somewhere, I'm just not sure where...


Cutting Edge: Go Beyond HTML Forms With AJAX


This month we examine forms in the context of AJAX applications and look at various approaches to implementing features such as auto-saving, just-in-time validation, and submission throttling.

Dino Esposito

MSDN Magazine June 2009

Editor's Note: Get Ready for AJAX


If you're fortunate enough to attend a developer conference this year, look around at the variety of people. There are all kinds out there, a diverse ecosystem as the marketing folks might say. Even within a relatively narrow group like programmers, you'll find a wide range of goals and interests.

MSDN Magazine July 2006

ASP.NET HTML Editor - Upload images

The article ASP.NET HTML Editor - Upload images was added by adarshtated on Tuesday, June 29, 2010.

In this article we are seen how to create a custom HTML Editor control to add image button in it.Create A Class-----------CustomEditor.cs------------------Add Name Spaceusing AjaxControlToolkit.HTMLEditor;namespace MyControls{ public class CustomEditor



I'm looking into using the HTMLEditor from the toolkit. I know its open source which isn't the problem. The problem is that I don't want to have my program to be open source but would like to use the editor. The source code I'd like to be paid for where the compiled version (the dlls and aspx pages) will be free to download. Is it possible to do that?

Content Editor Web Part in default.aspx not copied over.


I have a CEWP with some content in the default.aspx page on one site, and I downloaded and uploaded the default.aspx page to another site collection. But when I display the default.aspx page in the browser the CEWP is not there anymore.

Is the CEWP detached from the default.aspx page and must also be copied over to the new site collection? If so, then where is the CEWP stored?

Thanks for any help. 

Html editor word wrap problem

I created an html editor which uses an iframe for designing. The iframe doesnt wraps the text within it.... but the text keeps on extending in the same row towards the right. i tried setting scrolling='no' but it didnt work... tried word-wrap:break-word but thats also of no use........ please help! 

where does Content Editor store it's content?

I know this must be a pretty standard thing but I must have missed it. Where or How does the sharepoint content editor store the content placed in it? Does that data get stored in a property of the webpart? Like if I were looking at the webpart of a particular webpage document library item using SharePointManager 2007, What property would that data exist in?

Remove Word Style once copy and paste content to Rich text Editor in sharepoint 2010

Hi Guys, I have page layout for Users to add content for Page.I have site column for page content on field type HTML with Richtextmode="FUll Html". Now when user cut and paste content from Word document in this Field it carry word document style. how can i control this content on Page layout with CSS. Please adviseThanks Ron

package 'Visual Web Developer HTML Source Editor Package' has failed to load

Hi All  I am using VS 2008 Team Edition with SP1 installed. All was fine till yesterday when i started receiving the error 'package 'Visual Web Developer HTML SourceEditor Package' has failed to load properly (GUID={xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}}' . I am able to build the project and can do work in cs files but no support for the design view. Reinstall is not fixing this, Please HELP

Content Editor Web Part Title Wrap

Hello! I have run into a strange problem with wrapping the web part titles for the content editor web part. The classes appear to be the same for both the content editor titles and the list web part titles, however, the styles I applied ( word-wrap: break-word !important; ) and ( white-space: normal !important; ) are only working on the list web part titles. These web parts are in zones with a fixed width, and cells with a fixed width, but anytime a content editor part is added (with a long title) it still blows out the zone instead of wrapping the text. Any ideas would be appreciated.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend