Problem with TargetFolder

Thread is closed for posting
3 posts, 0 answers
  1. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 11 Dec 2012 Link to this post

    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. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 14 Dec 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fabio Cirillo
    Fabio Cirillo avatar
    180 posts
    Member since:
    Jan 2010

    Posted 14 Dec 2012 Link to this post

    Yes
    i've done into page_load ;)

    thaks bye bye
Back to Top