RadControls for ASP.NET AJAX RadEditor has built-in support for uploading/deleting/inserting images. The developer can allow end-users to upload, insert and delete images in the folder structure of the web-application by setting the following properties:
For example, to enable users to upload images in the "~/Images" folder and all of its subfolders, you need to set the ImageManager-ViewPaths, ImageManager-UploadPaths, and ImageManager-DeletePaths properties as follows:
There are two approaches to set the Image Manager's paths:
CopyXML
<telerik:RadEditor ID="RadEditor1" runat="server"
ImageManager-ViewPaths="~/Images"
ImageManager-UploadPaths="~/Images"
ImageManager-DeletePaths="~/Images" >
</telerik:RadEditor>
CopyXML
<telerik:RadEditor ID="RadEditor1" runat="server">
<ImageManager
ViewPaths="~/Images"
DeletePaths="~/Images"
UploadPaths="~/Images" />
</telerik:RadEditor>
CopyC#
string[] imagepath = {"~/Images"};
RadEditor1.ImageManager.UploadPaths = imagepath;
RadEditor1.ImageManager.ViewPaths = imagepath;
RadEditor1.ImageManager.DeletePaths = imagepath;
CopyVB.NET
Dim imagepath() As String = {"~/Images"}
RadEditor1.ImageManager.UploadPaths = imagepath
RadEditor1.ImageManager.ViewPaths = imagepath
RadEditor1.ImageManager.DeletePaths = imagepath Note |
|---|
Note that the imagepath variable is an array of strings and that the Images folder must be: a subdirectory of your web application or a virtual directory of your web application that has a physical path pointing outside of your web application. a shared drive that is a virtual folder of your web application.
You should also grant full ASPNET (WinXP) / NETWORK SERVICE (Win 2003 and Vista) account permissions to the Images Folders.
|
See Also