Does VB.NET have an 'INET' control ?

Logicworks

Newcomer
Joined
Aug 10, 2003
Messages
2
Location
Canada
Hi all,

Does VB.NET has a similar control to the VB6 "inet"
for easy internet access?
I looked in the toolbox and the components list but
could'nt find anything.
If VB.Net does not have such a control, what did
microsoft offer in it's place ?

Thanks to anyone who can help,
Logicworks
 
I just gotr VB.Net today, and I want to use something similar to inet, where do I add thos controls? I cannot find them
 
They are not controls, they are components, but they are not found in the ToolBox by default. You can instantiate them in code.
[Vb]
Dim X As New System.Net.WebClient
Dim Y As System.Net.WebRequest = System.Net.WebRequest.Create(MyUri)
[/CODE]
 
marble_eater said:
They are not controls, they are components, but they are not found in the ToolBox by default. You can instantiate them in code.
[Vb]
Dim X As New System.Net.WebClient
Dim Y As System.Net.WebRequest = System.Net.WebRequest.Create(MyUri)
[/CODE]

Wow, VB.Net is difficult. MY URI is not declared o.0
 
you need to declare myUri as a new URI ( you can also specify a url as a string )

eg:
Code:
[font=Courier New][size=2][color=#008000]'/// declare myUri ( note : you can also use a string as the uri in your request , eg: HttpWebRequest.Create("http://msn.co.uk/") )[/color][/size][/font]
 
[font=Courier New][size=2][color=#0000ff]Dim[/color][/size][size=2] myUri [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] Uri([url="http://msn.co.uk/"]http://msn.co.uk/[/url])[/size][/font]
[font=Courier New][size=2][color=#008000]'/// make a request to the URI ...[/color][/size][/font]
 
[font=Courier New][size=2][color=#0000ff]Dim[/color][/size][size=2] request [/size][size=2][color=#0000ff]As[/color][/size][size=2] WebRequest = [/size][size=2][color=#0000ff]DirectCast[/color][/size][size=2](WebRequest.Create(myUri), WebRequest)[/size][/font]
[font=Courier New][size=2][color=#0000ff]Dim[/color][/size][size=2] response [/size][size=2][color=#0000ff]As[/color][/size][size=2] WebResponse = request.GetResponse[/size][/font]
[font=Courier New][size=2]MessageBox.Show(response.Headers.ToString)
[/size][/font]
 
Back
Top