實現簡單下載代碼
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim remoteUri As String = "http://www.yourname.com/"
Dim fileName As String = "index.htm"
Dim myStringWebResource As String = Nothing
Dim myWebClient As New WebClient
myStringWebResource = remoteUri + fileName
myWebClient.DownloadFile(myStringWebResource, "c:/index.htm")
End Sub
Dim remoteUri As String = "http://www.yourname.com/"
Dim fileName As String = "index.htm"
Dim myStringWebResource As String = Nothing
Dim myWebClient As New WebClient
myStringWebResource = remoteUri + fileName
myWebClient.DownloadFile(myStringWebResource, "c:/index.htm")
End Sub
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
一文搞懂5種內存溢出案例,內含完整源碼
原創
2024-06-05 10:56:55
AppBuilder低代碼體驗:構建雅思大作文組件
Ai technology 前言 AppBuilder上線了低代碼製作組件功能,可以通過工作流的方式構建自定義組件,完成簡單Agent無法完成的複雜功能,使得生成的文本更加定製化,
原創
2024-05-16 00:15:54
有點意思的 Java 遞歸調用
原創
2024-05-13 02:41:48
基於Redis實現基本搶紅包算法
原創
2024-04-17 11:18:19
Java中拼接字符串方式(+、StringBuilder/StringBuffer)分析
原創
2024-04-09 21:31:20
Java中String 、StringBuilder 、StringBuffer 的區別
原創
2024-04-08 09:31:31
JPA不識別MySQL的枚舉類型
原創
2024-04-02 01:07:56
go-Channel
原創
2024-03-24 00:10:06
vue3 scss style scope 加了無法重寫
原創
2024-06-02 02:09:05
界面控件DevExtreme v23.2亮點 - 標籤、表單、編輯器功能升級
原創
2024-05-28 12:19:08
Vue 學習筆記簡寫
一.Vue文件內容 <template> </template> <script> </script> <style> </style>
原創
2024-05-13 21:42:40
一鍵自動化博客發佈工具,用過的人都說好(csdn篇)
原創
2024-05-13 21:39:29
6個實例帶你解讀TinyVue 組件庫跨框架技術
原創
2024-04-26 10:33:20
如何使用 JavaScript 導入和導出 Excel
原創
2024-03-20 10:43:28