Files are not sent to the target folder

1 posts, 0 answers
  1. Ney
    Ney avatar
    2 posts
    Member since:
    Sep 2007

    Posted 03 Feb 2017 Link to this post

    I'm trying to dynamically create multiple asyncupload controls. The creation happens without problems. When I try to send the files to the folder, they are not sent. I made some basic settings but I was not able to identify the problem.

    There is no error return, just does not send the file to the folder.
    Note: the file is loaded in the temporary folder.

    I ask for help, please.

    My code below.

    Sub CarregaItensLicitacao(lcID As String)
            If Not String.IsNullOrEmpty(lcID) Then
                Dim strSQL As String = Vazio
                strSQL += " select *"
                strSQL += " from ItemLicitacao"
                strSQL += " where"
                strSQL += " ilLcID in ("
                strSQL += lcID
                strSQL += " )"

                Dim lc As New Licitacaocliente

                Dim dt As New DataTable
                ExecutaSQL(strSQL, dt)

                Dim c As Integer = 1
                For Each Item As DataRow In dt.Rows
                    If Not Directory.Exists(lc.lcDiretorio & "\Itens\" & Item("ilDescricao")) Then
                        Directory.CreateDirectory(lc.lcDiretorio & "\Itens\" & Item("ilDescricao"))
                    End If

                    Dim upload As New RadAsyncUpload()
                    upload.ID = "upload" & c
                    upload.TargetFolder = lc.lcDiretorio & "\Itens\" & Item("ilDescricao")

                    Dim lbl As New Label
                    lbl.Text = Item("ilDescricao")


                    RadAjaxManager1.AjaxSettings.AddAjaxSetting(btnEnviarItem, upload, Nothing)
                    c += 1
            End If
        End Sub

Back to Top