Gets or sets the paths where the RadEditor will look for media files.
Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property MediaPaths As String() |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As RadEditor
Dim value() As String
instance.MediaPaths = value
value = instance.MediaPaths
|
| C# | |
|---|
public string[] MediaPaths {get; set;} |
Return Value
A string array which contains the paths where the RadEditor will look for
media files. The default value is empty string array.
Example
This example demonstrates how to set the MediaPaths,
UploadMediaPaths and
DeleteMediaPaths properties in the ASPX or in
the code-behind:
<rade:radeditor
runat="server"
id="RadEditor1"
mediapaths="~/UploadMedia,/Media/Temp,/Media/Default"
uploadmediapaths="~/UploadMedia,/Media/Temp"
deletemediapaths="/Media/Temp">
</rade:radeditor>
In this specific example the users of the application will see three
folders in the Media Manager dialog:
UploadMedia,
Default and
Temp.
When browsing the UploadMedia and
Temp folders, the Upload Media tab will be
enabled; otherwise it will be disabled.
When browsing the Temp folder, the Delete
button in the Browse Media tab will be enabled; otherwise it will be
disabled.
The Media folder will not be browsable.
If you want to allow the users to browse it you should add
"/Media" to the MediaPaths list.
| Visual Basic | Copy Code |
|---|
RadEditor1.MediaPaths = New String(3) {"~/UploadMedia", "/Media/Temp", "/Media/Default"}
RadEditor1.UploadMediaPaths = New String(2) {"~/UploadMedia", "/Media/Temp"}
RadEditor1.DeleteMediaPaths = New String(1) {"/Media/Temp"}
|
| C# | Copy Code |
|---|
RadEditor1.MediaPaths = new string[3] {"~/UploadMedia", "/Media/Temp", "/Media/Default"};
RadEditor1.UploadMediaPaths = new string[2] {"~/UploadMedia", "/Media/Temp"};
RadEditor1.DeleteMediaPaths = new string[1] {"/Media/Temp"};
|
Remarks
Requirements
Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also