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

Files are not sent to the target folder

0 Answers 10 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Ney
Top achievements
Rank 1
Ney asked on 03 Feb 2017, 12:53 PM

Hello,
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
            lc.Read(lcID)

            Dim dt As New DataTable
            ExecutaSQL(strSQL, dt)


            Dim c As Integer = 1
            For Each Item As DataRow In dt.Rows
                DoEvents()
                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")

                pvItem.Controls.Add(lbl)
                pvItem.Controls.Add(upload)

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

No answers yet. Maybe you can help?

Tags
AsyncUpload
Asked by
Ney
Top achievements
Rank 1
Share this question
or