15-01-17, 03:10 PM
جربت هذا الكود بس ما نزل معاي شي
<UL>
<LI><A HREF="downloadedfiles/AP1BP3739.adi">.ADI file</A>
</UL>
كود :
' Locate the "Download Handle (128 KB)" hyperlink and automatically download it
' <a id="ctl00_mainContentContainer_ctl11" href="http://download.sysinternals.com/Files/Handle.zip"><strong>Download Handle (128 KB)</strong></a>
Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("LI")
For Each curElement As HtmlElement In theElementCollection
Dim controlName As String = curElement.GetAttribute("InnerText").ToString
If controlName = ".ADI file" Then
Dim linkURL As String = curElement.GetAttribute("HREF").ToString
' Download file in OverWrite mode
Using client = New WebClient()
client.DownloadFile(linkURL, "D:\5")
End Using
End If
Next<UL>
<LI><A HREF="downloadedfiles/AP1BP3739.adi">.ADI file</A>
</UL>

