need help for my assignment

Last post 06-14-2009 3:09 PM by adilahmedmd@gmail.com. 3 replies.

Sort Posts:

  • need help for my assignment

    06-14-2009, 12:55 PM
    • Member
      point Member
    • anoushka
    • Member since 06-14-2009, 4:49 PM
    • Posts 1

    Hi,

    I am new to visual studio 2005. My assignment is to provide URL as a input(via GUI) and parse the given url and download the material from tht URL and if it contains pdf, doc and images, then my application will download the pdf and will save into the PDF folder on my machine and simmilarly other data also in relevant folder.

    Please guide me , how should I start this assignment ..

     

    Shall I use web browsing control in my application  and what control should perform downloading task..please let me know....

     

    Thanks,

    Anoushka

  • Re: need help for my assignment

    06-14-2009, 1:51 PM
    • Star
      10,560 point Star
    • getchinna_sv
    • Member since 09-10-2008, 4:29 PM
    • Hyderabad
    • Posts 1,783

    can you please explain bit clear what you want to do....

    Chinna_sv...
  • Re: need help for my assignment

    06-14-2009, 2:34 PM
    Answer
    • Contributor
      4,042 point Contributor
    • deepthoughts
    • Member since 01-27-2009, 9:55 AM
    • Posts 608

    You'll have to use the WebClient class residing inside the System.Net namespace. Please explore it in further details, you can create an instance of the WebClient class

    WebClient client = new WebClient();

    and then it has got methods like

    client.DownloadData(url);  to get the HTML source of the webpage

    or

    client.DownloadFile(url,fileName); to save the file physically on your local drive.

    Before calling the DownloadFile method first check the extension of the URL like, like if it ends with .pdf then in the fileName variable pass in the path to the folder where you want to save PDF files.

    Hope it helps.

     

    MARK AS ANSWER if it helps
  • Re: need help for my assignment

    06-14-2009, 3:09 PM

     Hi anushka

    Try to follow these links

     

    http://www.codeproject.com/KB/aspnet/DownloadAssistant.aspx

    http://forums.asp.net/p/1189823/2040434.aspx

    http://forums.asp.net/p/942782/1131139.aspx#1131139

    http://www.codeproject.com/KB/aspnet/textfile.aspx

    adilahmed
Page 1 of 1 (4 items)