downloadstring

Why isnt WPF displaying an accented character correctly?

I'm downloading a webpage, and then loading strings from the page into a WPF UI. One string has an accented character: "Áine". In the debugger, the string looks fine, but when added to a WPF ListBox, it appears like this: Á[]ine, where [] is a single rectangular symbol. When I copy the text from the debugger UI and paste it, a space ap...

The remote server returned an error: (404) Not Found.

I am running this piece of code to get the source code (as string) of my webpage. The problem is why this function returns 404 error? Private Function getPageSource(ByVal URL As String) As String Dim webClient As New System.Net.WebClient() Dim strSource As String = webClient.DownloadString(URL) webClient.Dispose() Retur...

vb.net WebClient.DownloadString fails to retrieve html

Can anyone help explain why the code below fails to retrieve the html Dim WebReqeust As WebClient = New WebClient Dim URL as string = "http://www.professionalorganizervannuys.com" Dim WebPage As String = WebReqeust.DownloadString(URL) It fails on this particular URL. Thanks in advance. ...

C# String manipulation

Hi there. I am working on an application that gets text from a text file on a page. Example link: http://test.com/textfile.txt This text file contains the following text: 1 Milk Stuff1.rar 2 Milk Stuff2.rar 3 Milk Stuff2-1.rar 4 Union Stuff3.rar What I am trying to do is as follows, to remove everything from each line, except for "w...