Bonjour,
Je me trouve face à un mur et je n'arrive pas à trouver sur internet.
VB me dit : "erreur 30456 : 'encoding' n'est pas un membre de 'string'"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Dim ByteStr As Byte() Dim WC As New WebClient ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12 WC.Headers.Add("User-Agent: Other") Try ByteStr = WC.DownloadData("https://www......") sHtml = Text.Encoding.UTF8.GetString(ByteStr) Catch ex As Exception End Try
En import j'ai bien pourtant :
Je tourne en rond !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 Imports System.Text Imports System.Net
Merci pour votre aide.
Partager