954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Browse directory to select a folder....

I am writing program that should allow the user to hit a browse button and be able to browse in their local directory to select a folder that they will later on save a file to.

I know you can do this in windows forms but since I am using a web application in vb.net I don't have this option.

Here is the code I have so far, please help!

Protected Sub Browse_Click(ByVal sender As Object, ByVal e As EventArgs)

        Dim FilePath As Object = "C:/Temp"
        System.Web.HttpResponse(Response = System.Web.HttpContext.Current.Response)
        Response.ClearContent()
        Response.Clear()
        Response.ContentType = "text/plain"
        Response.AddHeader("Content-Disposition", "attachment; filename = " + FileName + ";")
        Response.TransmitFile(FilePath)
        Response.Write("Username:")
        Response.Write(UserName.Text)
        Response.Write("  ")
        Response.Write("Authorization Level:")
        Response.Write(AuthlvlLabel.Text)
        Response.Write("  ")
        Response.Write("Database:")
        Response.Write(DropDownList1.Text)
        Response.Write("  ")
        Response.Write("Dataset:")
        Response.Write(DropDownList2.Text)
        Response.Write("  ")
        Response.Write("ID:")
        Response.Write(ID.Text)
        Response.Flush()
        Response.End()

    End Sub


--the red is where I am also getting an error

sastokes
Junior Poster in Training
50 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: