We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

pw200's avatar
pw200
New member | Level 2
7 years ago

Download one file in ASP.net VB

Good day all

 

I'm really sorry if this question has been asked before, I have searched a lot without success. I want to download one file from my own account using ASP.net, but using VB (not C#). I have downloaded the V2 API package 

 

 PM> Install-Package Dropbox.Api

 

I have tried without using the above SDK using this code. Although a file is created on my computer its full of junk.

 

    Protected Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click


Dim UrlPath As String = "https://www.dropbox.com/s/quswjzadmomb6xz/Linux.txt?dl=0" ' make sure you get the download path of the file in this format
        Dim DownloadToThisFilename As String = "C:\test\FileName.txt"  ' filename for the file to be downloaded to
        Try
            Using Client As New System.Net.WebClient()
                Client.DownloadFile(UrlPath, DownloadToThisFilename)
            End Using
        Catch

            MsgBox("Issues")


        End Try



    End Sub

Two solutions I think are possible and I would be happy with either

 

1. A VB solution that is similar to the above  

 

or

 

2. A solution that does use the SDK, but once again written in VB

 

Any help very much appreciated

 

Peter

 

PS - its an Excel file I want to download if that makes any difference

 

 

 

 

 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 8 hours ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!