Hiding AxWebBrowser control

A

Arturo j Torres

Hi!

I wrote an app to log-in and retrieve a numer of webpages.
To do this I have used an AxWebBrowser, controlling the
iexplorer with SendKeys (yes, i know this is anything but
elegant, but i like the iexplorer doing all dirty work ;).
The only problem for this, is that the control must have
the focus (and therefore be visible)...

Now, i'm trying to make things in a better way, but the
problem is that some of these webpages use javascript to
change session ID dinamically, and i don't know how to
process that with a httpwebrequest. ¿Is there any wway to
control an AxWebBrowser (i mean, load a page, fill the
fields of a form and fire the submit event) without show
the control? ¿Or mayby a way to process the javascript of
a document?

Thanks (and sorry for my english ;=)
 
N

Nicholas Paldino [.NET/C# MVP]

Arturo,

You can set a reference to MSHTML.tlb in your project, and then create
an instance of the HTMLDocument control. This will allow you to load and
parse HTML into it, without the user interface. You should also be able to
run the javascript code as well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi!

I wrote an app to log-in and retrieve a numer of webpages.
To do this I have used an AxWebBrowser, controlling the
iexplorer with SendKeys (yes, i know this is anything but
elegant, but i like the iexplorer doing all dirty work ;).
The only problem for this, is that the control must have
the focus (and therefore be visible)...

Now, i'm trying to make things in a better way, but the
problem is that some of these webpages use javascript to
change session ID dinamically, and i don't know how to
process that with a httpwebrequest. ¿Is there any wway to
control an AxWebBrowser (i mean, load a page, fill the
fields of a form and fire the submit event) without show
the control? ¿Or mayby a way to process the javascript of
a document?

Thanks (and sorry for my english ;=)
 

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