1. Create one project with one Class & Import these two namespaces in your class.
Imports System.Net
Imports System.IO
2. Now in a function where you want to send web HTTP request, write below lines of code
0: Dim webStream As Stream
1: Dim webResponse = ""
2: Dim req As HttpWebRequest
3: Dim res As HttpWebResponse
4: ' REQUEST PAGE (We are requesting Google Finance Page with NSE:RENUKA Stock Info
5: req = WebRequest.Create("http://www.google.com/finance?q=NSE:RENUKA")
6:
7: req.Method = "GET" ' Method of sending HTTP Request(GET/POST)
8: res = req.GetResponse() ' Send Request
9:
10: webStream = res.GetResponseStream() ' Get Response
11: Dim webStreamReader As New StreamReader(webStream)
12: ' READ Response in one Variable
13: While webStreamReader.Peek >= 0
14: webResponse = webStreamReader.ReadToEnd()
15: End While
3. At the end of the line:15 above, in the webResponse variable you will get the whole HTTP response and you can use it to get/retrieve values from that response.
This types of methods can be used if you want to build software which will be taking some values from some sites and displaying in in the Tool. The best example is Desktop Stock Ticker. We can build Real time Stock Ticker just based on it in VB .net.
Published by Paresh
I love to do Painting, Sketching, Photography and many more things. I started writing on things which interests me. I am not an expert in writing but I am trying to be a good writer :) Most of the time yo... View profile
Can You Tailor Your Food to Your Metabolic Body Type, Genes, and Brain's...Your brain's response to looking at food could be linked to weight loss or gain.
Republican Response: Governor Bobby Jindal Certainly No Sarah PalinThat was the Republican response to the President's Address to Congress? Even Ed Rollins, political strategist for Ronald Reagan and a contributing analyst for CNN, laughingly s...
A Response From a Cheating Spouse to "I Do Not Understand Adultery"This article is in response to an article posted by Sherry Upson on September 13, 2006. Comment fields on AC are painfully small and I am painfully long-winded.
First Response ERPT: Accurate Answers FASTFirst Response ERPT is an excellent home pregnancy test.
Response to Ordinary American Opinion on Our Leader and Current World Ev...This article is submitted in response to Content Producer Patrick Aldrich's submission, Ordinary American Opinion on Our Leader and Current World Events.
- The Best Tutorial Sites for Visual Basic.NET
- Creating a HelloWorld Console Application Using VisualBasic.NET
- Getting Started with the .NET Framework
- E-commerce Application Solutions Utilizing Microsoft's .NET
- Making Ajax Request
- Making Ajax Request
- How to Handle an Unwanted Facebook Friend Request from a Parent
- How to send HTTP Request using VB .net
- How to get HTTP Response using VB .net
- What can we do using HTTP Request and Response?



