Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8082809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:14:36+00:00 2026-06-05T17:14:36+00:00

I want to use CKEditor with DynamicData Web Site. The all examples that I

  • 0

I want to use CKEditor with DynamicData Web Site. The all examples that I have found are old version of CKEditor.

So How can I integrate CKEditor with asp.net dyamica data web site?

Any help will be greately appreciated.

İY

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:14:38+00:00Added an answer on June 5, 2026 at 5:14 pm

    What I did was to modify the MultilineText_Edit.ascx file + code-behind located in your Dynamic Data /FieldTemplates/ folder as shown below. Note that in my example you would need to reference jQuery and the CKEditor jQuery adapter, the latter most probably located in /ckeditor/adapters/jquery.js.

    The idea is to use the HiddenField control with ID=”State” as carrier for the data. Notice the client-script that is registered in the overridden OnPreRender(...): On any .NET form submission (here triggered by Dynamic Data trying to save, update or the like), the data from the CKEditor is saved to the State Hiddenfield, and the data is extraced from the FieldTemplate control from State via the overridden ExtractValues(...).

    To clarify: the reason for not returning contents of the TextBox control, Editor, itself, is that this will return the initial contents of the control, discarding CKEditor changes. CKEditor needs to client-side render its markup and stuff to somewhere, and so we do this to the State HiddenField (doing it to the TextBox control itself will mess stuff up, as far as I recall).

    One last thing: If you want to keep your MultilineText_Edit.ascx for normal non-CKEditor multiline text editing, put the code in a new file instead, e.g. MultilineHtml_Edit.ascx and set the UIHint for the property to “MultilineHtml” in the metadata class for your partial Linq2SQL class:

    [UIHint("MultilineHtml")]
    public string Description { get; set; }
    

    MultilineText_Edit.ascx

    <%@ Control Language="C#" CodeBehind="MultilineText_Edit.ascx.cs" Inherits="MyProject.DynamicData.MultilineText_EditField" %>
    
    
    <asp:TextBox ID="Editor" TextMode="MultiLine" runat="server" />
    <asp:HiddenField ID="State" runat="server" />
    
    <script type="text/javascript">
        $(document).ready(function () {
            $('#<%= Editor.ClientID %>').ckeditor(function () { }, { height: '400px' });
        });
    </script>
    
    
    <asp:RequiredFieldValidator runat="server" id="RequiredFieldValidator1" CssClass="DDControl DDValidator" ControlToValidate="Editor" Display="Static" Enabled="false" />
    <asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" CssClass="DDControl DDValidator" ControlToValidate="Editor" Display="Static" Enabled="false" />
    <asp:DynamicValidator runat="server" id="DynamicValidator1" CssClass="DDControl DDValidator" ControlToValidate="Editor" Display="Static" />
    

    MultilineText_Edit.ascx.cs

    using System;
    using System.Collections.Specialized;
    using System.Web.UI;
    
    namespace MyProject.DynamicData
    {
        public partial class MultilineText_EditField : System.Web.DynamicData.FieldTemplateUserControl
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                Editor.MaxLength = Column.MaxLength;
                Editor.ToolTip = Column.Description;
    
                SetUpValidator(RequiredFieldValidator1);
                SetUpValidator(RegularExpressionValidator1);
                SetUpValidator(DynamicValidator1);
            }
    
            public override void DataBind()
            {
                Editor.Text = FieldValueEditString;
    
                base.DataBind();
            }
    
            protected override void OnPreRender(EventArgs e)
            {
                Page.ClientScript.RegisterOnSubmitStatement(
                    this.GetType(),
                    string.Format("kfckpb_{0}", this.ClientID),
                    string.Format("$('#{0}').val($('#{1}').val());", State.ClientID, Editor.ClientID)
                    );
    
                base.OnPreRender(e);
            }
    
    
            protected override void ExtractValues(IOrderedDictionary dictionary)
            {
                dictionary[Column.Name] = ConvertEditedValue(State.Value);
            }
    
            public override Control DataControl
            {
                get
                {
                    return Editor;
                }
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use Ckeditor for Entering text and I want to save that
i'v got a trouble, i want to use Ckeditor with my project, i have
I want to use ckeditor plugin, and pagination in my application; but there is
In my Asp.net MVC 1.0 application I want to use CKEditor as my Rich
I like CKEditor and my server uses PHP. I want to use CKEditor to
I'm using CKEditor in a CMS I've built. I want use the ability to
I want use BYTE_ORDER macro in my Xcode project but i can't because i
I want use MVVM design pattern in WPF and Silverlight Application. Where can i
I want use a typedef struct that isn't already defined, but it is later.
I want use a Redis server with a PHP Site hosted on a MediaTemple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.