1

I'm trying to implement a customized Ajax Control Toolkit HTML Editor control in a Web Application. How do I do this without using a class in the app_code directory (since it's really not supported, especially in Azure)? Any sample code (vb.net or c#) is greatly appreciated!

2 Answers 2

1

Create a separate project and reference it in your website.

<%@ Register Assembly="Library" namespace="MyLibrary.CustomControls" tagprefix="custom" %>
<custom:EditorControl ID="editor" runat="server" />




using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AjaxControlToolkit.HTMLEditor;

namespace MyLibrary.CustomControls
{
    public class EditorControl : Editor
    {
        protected override void FillTopToolbar()
        {
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Bold());
            TopToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.Italic());
        }
    protected override void FillBottomToolbar()
    {
        BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.DesignMode());
        BottomToolbar.Buttons.Add(new AjaxControlToolkit.HTMLEditor.ToolbarButton.PreviewMode());
    }
}

}

Sign up to request clarification or add additional context in comments.

Comments

0

As far as I know, the only way to customize HTML Editor control is to subclass it (and override some of its methods). You really can't use any code in your web application?

edit: Here is a MSDN forum topic about deploying code (C#,VB.NET) to Azure app.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.