SORU
1 Mart 2009, Pazar


Nasıl C HTML kaynak İndirebilirim#

Nasıl HTML kaynağını c web adresi alabilir miyim#?

CEVAP
1 Mart 2009, Pazar


WebClient class ile dosyaları indirebilirsiniz:

using System.Net;
//...
using (WebClient client = new WebClient ()) // WebClient class inherits IDisposable
{
    client.DownloadFile("http://yoursite.com/page.html", @"C:\localfile.html");

    // Or you can get the file content without saving it:
    string htmlCode = client.DownloadString("http://yoursite.com/page.html");
    //...
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:
C#

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Incredible Tutorials

    Incredible T

    27 EKİM 2006
  • Jimmie Jones

    Jimmie Jones

    16 Kasım 2007
  • Virtual Riot

    Virtual Riot

    19 Mayıs 2011