【发布时间】:2010-04-30 11:54:43
【问题描述】:
我正在运行这段代码来获取我的webpage. 的源代码(作为字符串)
问题是为什么这个函数返回404错误?
Private Function getPageSource(ByVal URL As String) As String
Dim webClient As New System.Net.WebClient()
Dim strSource As String = webClient.DownloadString(URL)
webClient.Dispose()
Return strSource
End Function
【问题讨论】:
-
1) 对于源代码,您的意思是 HTML 对吗? 2) 你能粘贴一个示例网址吗?
-
示例网址为kickstart.gr
标签: asp.net http-status-code-404 webclient downloadstring