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

Problem with TargetFolder

2 Answers 29 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Fabio Cirillo
Top achievements
Rank 1
Fabio Cirillo asked on 11 Dec 2012, 07:49 PM
Hello,
use the object radupload to send images to a remote server ... I have a problem with the TargetFolder. If I set the object properties of the folder, the transfer on the server is ok, but if you pass the path to the folder using vb net, transferring the image is not there. Why? Here is the code I use.
Protected Sub Imgbtncarica_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtncarica.Click
    Dim _dir As String = Server.MapPath("/Image/image_card/1")
     If Directory.Exists(_dir) = False Then
     Directory.CreateDirectory(_dir)
     End If
     RadUpload1.TargetFolder = "/Image/image_card/1"
    If RadUpload1.UploadedFiles.Count > 0 Then
        Label1.Text = "File caricato: " & RadUpload1.UploadedFiles.Item(0).FileName & "(" &
    Else
        Label1.Visible = False
    End If
End Sub

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 14 Dec 2012, 03:18 PM
Hello Fabio,

 
If you want to set the target folder from the code behind you should do is in an earlier event ( in the pageLoad event) for example). Otherwise if you just want to uploaded files to a location of your choice you can refer to this help topic where similar issue have been explained.

Hope this will be helpful.

All the best,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Fabio Cirillo
Top achievements
Rank 1
answered on 14 Dec 2012, 03:56 PM
Yes
i've done into page_load ;)

thaks bye bye
Tags
Upload (Obsolete)
Asked by
Fabio Cirillo
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Fabio Cirillo
Top achievements
Rank 1
Share this question
or