Not quite HTTPWebResponse, HTTPWebRequest

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello again,

I have exhaustively looked into HTTP WebResponse and HTTPWebRequest classes
and I see how they might be able to help me in my problem. Let me outline
what it is:

1) I am creating a testing program for a web form. This form has 4 text
fields and a submit button. The HTTPWebRequest/Response classes will input
the data from the form into the stream as if all action had already happened.
It produces no visual response at all (which is fine in some cases). This
information from Mark Rae was very useful (in that I also learned about
cookie handling which will be useful in the future.
2) Although the above submits the information to be processed, what I need
is to input the data visually at times. In other words, I need the form to be
found in IE and displayed (I have this part down using the
System.Diagnosics.Process class opening IE with arguments). Now I need to
manipulate this process I have opened, input text into the web page IE is
displaying and some how send the message to click submit.

I have a feeling that remoting will be the best way to do this however I am
not entirely sure. If it is remoting, does anyone know of any good books or
tutorials that explain the process or give some simple code examples? I have
searched through MSDN and Google and found a few theories on remoting but it
seems to be something alot of people stay away from. If I am going in to
wrong direction, what would be the best way to accomplish the above.

Thanks again for the help!
Tim
 
No html form wizard here, but have been using httpwebrequest a bit lattely.
If it is just for function testing, why not just create a winforms app to
collect the data, send the post using httpwebreq, and display the reply? Or
do you need the IE for some other reason?
 
TimSLC,

If you need to modify a running instance of IE, then you will not use
the HttpWebRequest and HttpWebResponse classes at all. First, check out the
Knowledge Base article 176792, titled "How To Connect to a Running Instance
of Internet Explorer". It is located at (watch for line wrap):

http://support.microsoft.com/kb/176792/EN-US/

While this is in VB (6), you can convert it to .NET easily. Once you do
that, you can get the object model for the page that internet explorer is
showing, and then set the values in the appropriate fields. Finally, you
can get the form that the fields are in, and submit that. The DOM provides
for all of this. The key is getting to it, which the KB article shows you
how to do.

Hope this helps.
 
Back
Top