This is a migrated thread and some comments may be shown as answers.

[Solved] Setting uploadpaths in code

1 Answer 100 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Grey
Top achievements
Rank 1
Grey asked on 24 Nov 2009, 10:17 AM
Hi,

I'm trying to set the upload,view and delte paths in code but keep on encountering errors.

The error is the old 'Object reference not set to an instance of an object.'

The strange thing is I'm testing using code copied directly from the Help file example yet I still get the error

See below :

Imports Telerik.Web.UI 
Partial Public Class blogsa 
 
    Inherits System.Web.UI.MasterPage 
 
 
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        Dim viewImages As String() = New String() {"~/Images"} 
        Dim uploadImages As String() = New String() {"~/Images/New"} 
        Dim deleteImages As String() = New String() {"~/Images/New/Articles", "~/Images/New/News"} 
        If Not IsPostBack Then 
            RadEditor1.ImageManager.ViewPaths = viewImages 
            RadEditor1.ImageManager.UploadPaths = uploadImages 
            RadEditor1.ImageManager.DeletePaths = deleteImages 
        End If 
    End Sub 
 
End Class 

Does anyone have any ideas ?


1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 27 Nov 2009, 10:39 AM
Hi Grey,

I was not able to reproduce your problem. I have attached a sample working project with your code and a movie that shows the result I get with it.

In case my sample does not help you fix the problem, please post the code of a simple test page that demonstrates the exception or open a support ticket and send a sample working project that demonstrates the issue.

All the best,
Dobromir
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Grey
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or