Web Request question

  • Thread starter Thread starter Kevin L
  • Start date Start date
K

Kevin L

I am able to type in a URL (with a parameter) using Internet Explorer and
see a Web Page returned with information.
I would like to execute this same URL request from a Windows Form
Application, get a response from the Web Site, and then use code to search
the response.

Is it possible to return information from a web site to a Windows Form
Application?

I thought that I could use an HTTPWEBREQUEST but I cannot seem to get it to
work and cannot find much in help that shows syntax etc.

Any help would be greatly appreciated.
Thank you.
 
Kevin,

There are a few good HOWTO's in the Microsoft knowledge base on using HttpWebRequest
from VB.NET for various tasks (like sending an e-mail) including this walkthrough,

http://support.microsoft.com/default.aspx?scid=kb;en-us;301102

Additonal more detailed examples, your application may not need every detail (for instance,
NetworkCrendentials are only necessary if you're authenticating, and your Content Type will
likely be different), but the following KB articles will give you more ideas about the properties
and methods you'll need to use,

http://support.microsoft.com/default.aspx?scid=kb;en-us;314199
http://support.microsoft.com/default.aspx?scid=kb;en-us;314193
http://support.microsoft.com/default.aspx?scid=kb;en-us;314196
http://support.microsoft.com/default.aspx?scid=kb;en-us;314198

If you're just sending a UrlEncoded query string in the URL, the Method of HttpWebRequest you'll
want to use is "GET" (most of these later examples deal with Exchange and use other HTTP methods
for that reason).


Derek Harmon
 
Thank Derek, much appreciated.



Derek Harmon said:
Kevin,

There are a few good HOWTO's in the Microsoft knowledge base on using
HttpWebRequest
from VB.NET for various tasks (like sending an e-mail) including this
walkthrough,

http://support.microsoft.com/default.aspx?scid=kb;en-us;301102

Additonal more detailed examples, your application may not need every
detail (for instance,
NetworkCrendentials are only necessary if you're authenticating, and your
Content Type will
likely be different), but the following KB articles will give you more
ideas about the properties
and methods you'll need to use,

http://support.microsoft.com/default.aspx?scid=kb;en-us;314199
http://support.microsoft.com/default.aspx?scid=kb;en-us;314193
http://support.microsoft.com/default.aspx?scid=kb;en-us;314196
http://support.microsoft.com/default.aspx?scid=kb;en-us;314198

If you're just sending a UrlEncoded query string in the URL, the Method of
HttpWebRequest you'll
want to use is "GET" (most of these later examples deal with Exchange and
use other HTTP methods
for that reason).


Derek Harmon
 

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

Back
Top