Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 06, 2012 02:34 PM by DarrellNorton
Apr 06, 2012 11:16 AM|LINK
I'm trying to write a webpage that processes a clients file and then returns the file to the client.
When the file processing is completed a completion message is output to the clients browser and a
button is provided for the client to request the processed file.
The following sub sends the file back to the client:
Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles ButtonSendClientFile.Click
Dim attachName As String = "attachment; filename= " & Label1Copyname.Text
Dim appPath As String = Request.PhysicalApplicationPath
Dim saveDir As String = "ReturnToClientFiles\"
Dim fileName As String = Label1Copyname.Text ' Get the name of the file to upload.
Dim savePath As String = appPath + saveDir + fileName
Response.ContentType = "text/plain"
The next thing I need to do is remove the clients file from my server folder "ReturnToClientFiles"
If I add the line:
nothing happens, and wherever I place it - no result (except errors).
How do I achieve wiping the file after sending to client on a single button click event?
Apr 06, 2012 02:34 PM|LINK