WebRequest in VB.NET ?

M

MikeG

Hi,

Here it goes...

I am writing a WINFORM app using VB.NET.
On one form, I have a text field where the user can write a search criteria.
When he click on the *search* button, my application searchs a particular
WEB page.
The results are pulled from a result WEB page and store into a WinForm grid.

I have been able to request the *search* WEB page.
I can also parse the results (another web page).

What I can't do (there are several things I still don't fully understand) is
how
put the value (from the WinForm app) into the WebConntrol textbox and post
it.
What I would like to do is use the html page I resquested as if it was in
the browser.
In other words, if a user opens the search web page, fills the search text
field,
clicks on the search button and the results are sent to him in another page,
I
would like the VB.NET app do the same (using WebRequest, HttpWebRequest and
WebResponse).

Any idea on how to do it?

Thank you.

Michel.
 
S

solex

Mike,

This sounds like a job for WebService. If you have control of the web app
you might want to consider creating a web service out of the current search
screen and results. Otherwise you will have to decide on what realm
(WebForm or Winform) you are displaying the data to the user combining the
two will be a PIA.

If you have access to Visual Studio Magazine I just read an article that
will help you set a query string to a web page and parse the results. It is
the article on Security entitled "Prevent Dictionary Attacks" December 2003.

If you do not have access to VSM let me know and I will post more info.

Dan
 
M

MikeG

Thank you for your help.

I don't have any control over the web app and the results will be display
using WinForm.

I have tried something very close to the code shown into that article, but
the results are
not what I expected.

Another question, is it possible to *load* an HTML page into VB.NET and use
it as if it
was loaded into a browser?
If so, what controls do I need?

Michel.
 
S

solex

Michel,

I am interested in your results, if you get a chance please tell.

The only control I can think of is using the Microsoft Internet/Transfer
Controls. This is a COM control so you will need to use the com interop
layer.

Dan
 

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