Hi!!
I have some code that get the contant of a site and display it...
its a windows form application....
but its too slow ( BTW: my internet connection isnt slow )
here is my code:
the code problem is this part:
What can I do to get a better performance?
Kind Regards,
gicio
I have some code that get the contant of a site and display it...
its a windows form application....
but its too slow ( BTW: my internet connection isnt slow )
here is my code:
Code:
textBox1.Text = String.Empty;
WebClient currentWebClient = new WebClient();
string strURL = _txtSiteUrl.Text.Trim();
byte[] aRequestedHTML;
aRequestedHTML = currentWebClient.DownloadData( strURL );
UTF8Encoding currentUTF8Encoding = new UTF8Encoding();
string strRequestedHTML;
strRequestedHTML = currentUTF8Encoding.GetString( aRequestedHTML );
textBox1.Text = strRequestedHTML;
the code problem is this part:
Code:
aRequestedHTML = currentWebClient.DownloadData( strURL );
What can I do to get a better performance?
Kind Regards,
gicio