HI all,

I have a webpath say: www.webserver.com/getfile.asp

How to download the resulting htm file thru vb.net?

in vb6 i used to do the following:



VB Code:
  1. Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
  2.  
  3.     Public Function DownloadFile(ByVal URL As String, ByVal LocalFilename As String) As Boolean
  4.         Dim lngRetVal As Long
  5.         lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
  6.         If lngRetVal = 0 Then DownloadFile = True
  7.     End Function

pls guide