Hi mudassarkhan,
I tried using multiple upload like ur suggestion but using my code. But i have 1 combobox outside uploadcontroler and want save value for that combobox. System cannot read that value. Y this problem happend?...is it i need directcast the combobox. Pls help me?
Dim ret As String = ""
Using adpGS As New dsGeneralSetupTableAdapters.GeneralSetupTableAdapter
adpGS.SelectCommand(0).CommandText = "Select * From GeneralSetup"
Dim sWhere As String = "Type= 'PATHTO'"
Dim dr As dsGeneralSetup.GeneralSetupRow = adpGS.GetDataByWhere(sWhere).Rows(0)
txtPathTo.Text = dr.Desciption
End Using
If uploadedFile.IsValid Then
Dim fileInfo As New IO.FileInfo(uploadedFile.FileName)
Dim resFileName As String = txtPathTo.Text + ASPxComboBox1.Text + fileInfo.Name
uploadedFile.SaveAs(resFileName)
Dim fileLabel As String = fileInfo.Name
Dim fileType As String = uploadedFile.PostedFile.ContentType.ToString()
Dim fileLength As String = uploadedFile.PostedFile.ContentLength / 1024 & "K"
ret = String.Format("{0} <i>({1})</i> {2}|{3}", fileLabel, fileType, fileLength, fileInfo.Name)
End If
Return ret
End Function
'Private Sub ListSuccess()
' bListMsg .Items .Add ("Upload Success!")
'End Sub
Protected Sub UploadControl_FileUploadComplete(ByVal sender As Object, ByVal e As FileUploadCompleteEventArgs) Handles UploadControl.FileUploadComplete
Try
e.CallbackData = SavePostedFiles(e.UploadedFile)
Catch ex As Exception
e.IsValid = False
e.ErrorText = ex.Message
End Try
'ListSuccess()
End Sub