WebClient urgent question !! ??

U

ucasesoftware

Dim url = "http://www.myUrl/hello.aspx?name=Sébastien"

if i do process.Start(url)
i receive Sébastien

if i do :
Dim data As Stream = client.OpenRead(url)
Dim reader As New StreamReader(data)
Dim webResult As String = reader.ReadToEnd()
data.Close()
reader.Close()
myForms.formPatientezSms.Close()

i received SAbastien

Someone could help !! ???
 
U

ucasesoftware

sorry i forget :
Dim client As New System.Net.WebClient
client.Headers.Add("user-agent", "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")

Dim data As Stream = client.OpenRead(url)
Dim reader As New StreamReader(data)
Dim webResult As String = reader.ReadToEnd()
data.Close()
reader.Close()
myForms.formPatientezSms.Close()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top