Select Case e.Path Case "download.htm" e.WriteFile("d:\web\" & e.values("wjm")) End Select
按钮click事件
Dim wjm = UrlEncode("2018年中秋放假通知.doc")
Dim hc As New HttpClient("http://127.0.0.1/download.htm?wjm=" & wjm) If hc.GetFile("c:\" & wjm) Then MessageBox.show("文件下载成功","提示") Else MessageBox.show("文件下载失败","提示") End If