473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Urgent: Integrate WebBrowser Control in ASP.NET/VB.NET?

How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use
the WebClient to get the page data, but I need to be able to use the
WebBrowser (AxWebBrowser)?

Thanks,

Chad
Nov 18 '05 #1
9 3783
You could host it as an ActiveX object. But, only IE users will be able to
view it and with XP-SP2 coming out, ActiveX controls are going to be very
difficult to deal with.

Why not try using a server-side IFrame or a JavaScript window.open()?

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use
the WebClient to get the page data, but I need to be able to use the
WebBrowser (AxWebBrowser)?

Thanks,

Chad

Nov 18 '05 #2
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing
on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
You could host it as an ActiveX object. But, only IE users will be able to
view it and with XP-SP2 coming out, ActiveX controls are going to be very
difficult to deal with.

Why not try using a server-side IFrame or a JavaScript window.open()?

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the
WebBrowser (AxWebBrowser)?

Thanks,

Chad


Nov 18 '05 #3
Ok, well, using the WebBrowser control, even in code behind, is going to A)
be huge tax on resources, and B) doesn't make sense. The System.Net classes
can deal with grabbing content from virtually any network recourse that you
can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing
on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
You could host it as an ActiveX object. But, only IE users will be able
to
view it and with XP-SP2 coming out, ActiveX controls are going to be very
difficult to deal with.

Why not try using a server-side IFrame or a JavaScript window.open()?

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
> How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use > the WebClient to get the page data, but I need to be able to use the
> WebBrowser (AxWebBrowser)?
>
> Thanks,
>
> Chad
>
>



Nov 18 '05 #4
I am going to use it to "capture" an image of a web page. I can't use the
WebClient (as far as I know) to capture/create an image of a remote wep
page. I know there are components to do this for you out there, I need to
figure out how to do this myself.

Thanks!

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Ok, well, using the WebBrowser control, even in code behind, is going to A) be huge tax on resources, and B) doesn't make sense. The System.Net classes can deal with grabbing content from virtually any network recourse that you can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
You could host it as an ActiveX object. But, only IE users will be able
to
view it and with XP-SP2 coming out, ActiveX controls are going to be very difficult to deal with.

Why not try using a server-side IFrame or a JavaScript window.open()?

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
> How can I run a WebBrowser control using ASP.NET/VB.NET? I know I
can use
> the WebClient to get the page data, but I need to be able to use the
> WebBrowser (AxWebBrowser)?
>
> Thanks,
>
> Chad
>
>



Nov 18 '05 #5
Hi Chad,

When you say "capture an image of a web page", are you referring to
something of a screen shot? If this is the case, you are spinning your
wheels. What you want to do is either use WebClient or
WebRequest/WebResponse to capture the actual HTML of the page (otherwise
known as "scraping"). Then, once you have the original HTML, you can do with
it as you please. You can store it, save it, display it in an IFrame or
Frame or whatever else you want to do. WebBrowser is not capable of doing
this.

The WebBrowser control is really more for WinForms and displaying HTML and
not for use in WebForms. Because it is an ActiveX control, it has a huge
overhead in terms of resources (Interop is expensive). Also, when you create
it in code-behind, there isn't much that you can do to actually get the HTML
of the source page that you would want to navigate to and capture. (Things
like the HTML DOM and such is not easily exposed from the WebBrowser
control). This is where the System.Net classes really excel. They were
designed for this sort of thing.

I would strongly recommend revaluating what you need to do and see if you
can do it using the native .NET classes as opposed to using ActiveX
controls. Even a server side IFrame would be 100x better than trying to use
the WebBrowser control.

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
I am going to use it to "capture" an image of a web page. I can't use the
WebClient (as far as I know) to capture/create an image of a remote wep
page. I know there are components to do this for you out there, I need to
figure out how to do this myself.

Thanks!

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Ok, well, using the WebBrowser control, even in code behind, is going to

A)
be huge tax on resources, and B) doesn't make sense. The System.Net

classes
can deal with grabbing content from virtually any network recourse that

you
can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
>I need to run it within the ASP .NET (VB .NET) in the code behind, nothing > on the client...
>
> Chad
>
> "Kyril Magnos" <ky**********@yahoo.com> wrote in message
> news:O2**************@tk2msftngp13.phx.gbl...
>> You could host it as an ActiveX object. But, only IE users will be
>> able
>> to
>> view it and with XP-SP2 coming out, ActiveX controls are going to be very >> difficult to deal with.
>>
>> Why not try using a server-side IFrame or a JavaScript window.open()?
>>
>> HTH,
>>
>> Kyril
>>
>> "ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
>> news:OZ**************@TK2MSFTNGP09.phx.gbl...
>> > How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can > use
>> > the WebClient to get the page data, but I need to be able to use the
>> > WebBrowser (AxWebBrowser)?
>> >
>> > Thanks,
>> >
>> > Chad
>> >
>> >
>>
>>
>
>



Nov 18 '05 #6
Take a look at this:

http://www.gotdotnet.com/Community/U...c-ff870a57cca1

It's in the form of a webservice; but should should be able to adapt it to web page image.

Scott
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message news:uD*************@TK2MSFTNGP09.phx.gbl...
I am going to use it to "capture" an image of a web page. I can't use the
WebClient (as far as I know) to capture/create an image of a remote wep
page. I know there are components to do this for you out there, I need to
figure out how to do this myself.

Thanks!

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Ok, well, using the WebBrowser control, even in code behind, is going to A) be huge tax on resources, and B) doesn't make sense. The System.Net classes can deal with grabbing content from virtually any network recourse that you can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
You could host it as an ActiveX object. But, only IE users will be able
to
view it and with XP-SP2 coming out, ActiveX controls are going to be very difficult to deal with.

Why not try using a server-side IFrame or a JavaScript window.open()?

HTH,

Kyril

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
> How can I run a WebBrowser control using ASP.NET/VB.NET? I know I
can use
> the WebClient to get the page data, but I need to be able to use the
> WebBrowser (AxWebBrowser)?
>
> Thanks,
>
> Chad
>
>



Nov 18 '05 #7
Thanks for the feedback guys. I don't need to capture the "contents" of the
page, I need an actual "screen shot" of the page. The posting from Scott G.
is what I'm looking for, except I can't use a web service (development
restrictions) and I can't use any third party components. All development
for this has to be "in-house".

Ideas?

Chad

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
I am going to use it to "capture" an image of a web page. I can't use the
WebClient (as far as I know) to capture/create an image of a remote wep
page. I know there are components to do this for you out there, I need to
figure out how to do this myself.

Thanks!

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Ok, well, using the WebBrowser control, even in code behind, is going to

A)
be huge tax on resources, and B) doesn't make sense. The System.Net

classes
can deal with grabbing content from virtually any network recourse that

you
can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
> You could host it as an ActiveX object. But, only IE users will be able> to
> view it and with XP-SP2 coming out, ActiveX controls are going to be very> difficult to deal with.
>
> Why not try using a server-side IFrame or a JavaScript window.open()?
>
> HTH,
>
> Kyril
>
> "ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
> news:OZ**************@TK2MSFTNGP09.phx.gbl...
> > How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use
> > the WebClient to get the page data, but I need to be able to use the> > WebBrowser (AxWebBrowser)?
> >
> > Thanks,
> >
> > Chad
> >
> >
>
>



Nov 18 '05 #8
The link I sent is source code; download it and just grab the imaging part out.... if I recall this isn't more than 10s of lines of code.

Scott
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message news:uQ**************@TK2MSFTNGP11.phx.gbl...
Thanks for the feedback guys. I don't need to capture the "contents" of the
page, I need an actual "screen shot" of the page. The posting from Scott G.
is what I'm looking for, except I can't use a web service (development
restrictions) and I can't use any third party components. All development
for this has to be "in-house".

Ideas?

Chad

"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:uD*************@TK2MSFTNGP09.phx.gbl...
I am going to use it to "capture" an image of a web page. I can't use the
WebClient (as far as I know) to capture/create an image of a remote wep
page. I know there are components to do this for you out there, I need to
figure out how to do this myself.

Thanks!

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Ok, well, using the WebBrowser control, even in code behind, is going to

A)
be huge tax on resources, and B) doesn't make sense. The System.Net

classes
can deal with grabbing content from virtually any network recourse that

you
can think of. Perhaps you can elaborate a bit on what you are trying to
accomplish with the WebBrowser control and I might be able to give you a
better answer. :)

Kyril
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OO**************@tk2msftngp13.phx.gbl...
I need to run it within the ASP .NET (VB .NET) in the code behind, nothing on the client...

Chad

"Kyril Magnos" <ky**********@yahoo.com> wrote in message
news:O2**************@tk2msftngp13.phx.gbl...
> You could host it as an ActiveX object. But, only IE users will be able> to
> view it and with XP-SP2 coming out, ActiveX controls are going to be very> difficult to deal with.
>
> Why not try using a server-side IFrame or a JavaScript window.open()?
>
> HTH,
>
> Kyril
>
> "ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
> news:OZ**************@TK2MSFTNGP09.phx.gbl...
> > How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use
> > the WebClient to get the page data, but I need to be able to use the> > WebBrowser (AxWebBrowser)?
> >
> > Thanks,
> >
> > Chad
> >
> >
>
>



Nov 18 '05 #9
its pretty complicated. the webservice example given uses the system shell
object to generate a thumbnail, not what you want.

anyway here is the standard approach (not high performance)

1) create a .net wrapper around the IE web control.
2) create a print driver that writes a bitmap to disk
2) load the url into the control (will have to poll or sync to the load)
3) tell the control to print to your driver (will need to poll again)
4) pick up the output of your driver

-- bruce (sqlwork.com)
"ASP .NET Newbie" <Ch*********@ProspectiveLink.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use
the WebClient to get the page data, but I need to be able to use the
WebBrowser (AxWebBrowser)?

Thanks,

Chad

Nov 18 '05 #10

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

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
4
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with...
0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
1
by: whilin | last post by:
Hello everybody, I have a WebBrowser control in a windows application and I need to get an image from its id. I tried getting it from Internet Explorer cache, by GetUrlCacheEntryInfo, but it...
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.