$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
How to put up Dialog of HtmlEditor Using C#
Home > How to > HtmlEditor Dialogs Introduction
The dialogs from the PerHtmlEditor Control are used to help users insert objects into editor content area, delete existing objects and upload objects. The objects mentioned here include the document file, image file, flash file, media file, xap file and template. And all these dialogs have three common properties, which are viewPath, UploadPath and DeletePath.
In following text, we will provide detailed C# programming codes to illustrate how to create and modify above mentioned dialogs using C# programming code.

How to Create DocumentManager Dialog Using C#

This document manager dialog allows users to insert document in editor content area, delete existing document from editor and upload new documents for inserting. Following C# code is used to guide developers how to enable the document manager and how to set the properties of document manger.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.DocumentManager.ViewPaths = viewPaths;
PerHtmlEditor1.DocumentManager.UploadPaths = UploadPaths;
PerHtmlEditor1.DocumentManager.EnableAsyncUpload = true;

How to Create ImageManager Dialog Using C#

The image manager dialog is used to help users upload new image, insert and delete image in or from the editor content area. Following image is a screen shot of the image manager dialog. The sample C# code below is used to show you how to modify the three properties of the image manager dialog.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.ImageManager.ViewPaths = viewPaths;
PerHtmlEditor1.ImageManager.UploadPaths = UploadPaths;
PerHtmlEditor1.ImageManager.EnableAsyncUpload = true;

How to Create FlashManager Dialog Using C#

After you add this media manager dialog to html editor, users are enabled to finish three tasks, which are media file inserting, deletion and uploading.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.FlashManager.ViewPaths = viewPaths;
PerHtmlEditor1.FlashManager.UploadPaths = UploadPaths;
PerHtmlEditor1.FlashManager.EnableAsyncUpload = true;

How to Create MediaManager Dialog Using C#

After you add this media manager dialog to html editor, users are enabled to finish three tasks, which are media file inserting, deletion and uploading.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.MediaManager.ViewPaths = viewPaths;
PerHtmlEditor1.MediaManager.UploadPaths = UploadPaths;
PerHtmlEditor1.MediaManager.EnableAsyncUpload = true;

How to Create SilverlightManager Dialog Using C#

This silverlight manger dialog allows users to add xap file in editor content area, delete existing xap file from editor and upload new xap file for inserting. Similarly, we also attach a C# code to illustrate how to modify the viewPath, UploadPath and DeletePath properties of the silverlight manager dialog.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.SilverlightManager.ViewPaths = viewPaths;
PerHtmlEditor1.SilverlightManager.UploadPaths = UploadPaths;
PerHtmlEditor1.SilverlightManager.EnableAsyncUpload = true;

How to Create TemplateManager Dialog Using C#

If you want to add template or delete template in / from editor content area, this dialog will be needed. Besides, this template manager dialog also allows users to upload new templates for later inserting.
Sample C# code is provided for setting template manager dialog using PerHtmlEditor Control in ASP.NET web application.
string[] viewPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };
string[] UploadPaths = new string[] { "~/Images/HtmlEditor/UserDir/Marketing", "~/Images/HtmlEditor/UserDir/PublicRelations" };

PerHtmlEditor1.TemplateManager.ViewPaths = viewPaths;
PerHtmlEditor1.TemplateManager.UploadPaths = UploadPaths;
PerHtmlEditor1.TemplateManager.EnableAsyncUpload = true;
ASP.NET AJAX UI Controls