473,473 Members | 4,185 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

WebRequest in VB.NET ?

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.

Nov 20 '05 #1
3 2049
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
"MikeG" <gi*****@hotmail.com> wrote in message
news:C7*******************@weber.videotron.net...
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.

Nov 20 '05 #2
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.
"solex" <so***@nowhere.com> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #3
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
"MikeG" <gi*****@hotmail.com> wrote in message
news:D0*******************@weber.videotron.net...
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.
"solex" <so***@nowhere.com> wrote in message
news:eY**************@TK2MSFTNGP09.phx.gbl...
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


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: James Johnson | last post by:
Dear C#dex, I define a variable: HttpWebRequest webRequest and run the following request webRequest = WebRequest.Create(TARGET_URL) as HttpWebRequest; The webRequest object returns values...
3
by: Paul | last post by:
Hello, First I want to refer to the problem "WebRequest : execute a button" of a few days ago. The way I solved it, I loose my session, and as a consequence my session variables. I don't want...
8
by: John K. | last post by:
Hi I was wondering if it's possible to use the WebRequest class to access a file on windows shared folder with authentication? If yes, what would the syntax be? I've tried to look this up in the...
12
by: ThyRock | last post by:
I am working on a WebRequest accessing the US Postal Service WebTools test API. This service uses a DLL file (ShippingAPITest.dll) with a query string which includes XML. The web service accepts...
0
by: Gordon | last post by:
I use the following code to get source HTML. The second line seems to work when I get no response from a site. However, I want to stop the request if it's taking more than 20 - 30 seconds. I can't...
1
by: David Satz | last post by:
Hello--I just upgraded to Visual Studio .NET 2005 and suddenly, all my .NET 1.1 applications that accessed Web sites have broken. For example, this code: WebClient wc = new WebClient();...
2
by: kkb | last post by:
Hello! First, I'm sorry because of my english... I'll try to be understandable! I've got a strange problem using .NET 2003 C# and I haven't figured it out for a long time. I'm implementing an...
1
by: Mr Flibble | last post by:
OK I logon to a web site and I manage to get an SMSESSION cookie that I then store in a variable called _session (a class scoping variable). I do this by calling a logon URL and setting a cookie...
3
by: eSolTec, Inc. 501(c)(3) | last post by:
Thank you in advance for any and all assistance. I'm trying to create a call to a web page to validate and register software. The code I'm using is: Private Sub OK_Click(ByVal sender As...
3
by: Dave | last post by:
string m_request = some_web_page; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request ); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Which works...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.