AxWebBrowser not in WinForm

D

Djavdet

Hi everyone,
I need to work with web sites from my program but i don't need to show
web site content.. I only need to get web page change something in html
document and either move on or send something back..
Basically pretty much the same what usually people would do with IE but
no windows...
I thought that it would be easier to implement using AxWebBrowser
ActiveX control, but I can't figure out how to set that OCXState field
if I don't create object within WinForm. If don't set it , I get
InvalidActiveXStateException...
So I guess my question is, how to use AxWebBrowser control without
WinForm or maybe there is a better way to solve my problem?
Thanks
D.
 
S

Sahil Malik

D,

I am not sure what you mean by ---
I only need to get web page change something in html
document and either move on or send something back..

But, I recently posted a little short code snippet on my blog -
http://dotnetjunkies.com/WebLog/sahilmalik/archive/2005/01/06/42130.aspx
that lets you easily retreive a URL and save it as MHT. Instead of saving,
you could get a string out of it, and work with it.

That right there is unmanaged code (uses interop), but there are other
managed ways to acheive this goal too. Unfortunately none of them allow you
to save as MHT but you might not need to do that.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 
A

Ashish Das

Assuming you are only trying to get HTML code of a given site, you can do a
Get request using HTTP protocol to get the code of HTML on the page.
 
D

Djavdet

Well,
yeah, but that gives me kinda read only access to the web site...
I need also interact with web site or send something back...

D.
 
A

Ashish Das

Solution depends on scenario you have. If webserver is local to you, or you
can access it directly and you have read/write rights then you can make
small FTP application to put html files (publishing folder). In that case
you really do not need to use HTTP protocol, you can directly access the
file you want to change. What is your scenario?
 
D

Djavdet

Hi,
no it is not the case.
My web servers are all in the internet...
I am surprised that there is no other objects then IE ActiveX
control...
D.
 
D

Djavdet

Thanks,
no, this is not what i need.
Like i said this is too much low level..
I guess i was looking for somethig like AxWebBrowser but without HTML
renderer..
D.
 
D

Djavdet

Hi thanks for your interest.
I sort of solved the problem by using AxWebBrowser control.
It's kinda bulky awkward solution but it works that's what matters.
D.
 

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