Results 1 to 2 of 2

Thread: Download file from web

  1. #1

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961

    Download file from web

    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

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    You could use Microsoft XMLHTTP object.

    Check this article for more details and example.

    http://www.4guysfromrolla.com/webtech/110100-1.shtml
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width