[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.buildingcontrols

Can I embed an IE control in a webpage?

jim

9/14/2007 1:24:00 PM

OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking
about it. I swear....if I didn't need this job, I'd tell 'em where to embed
their webbrowser control. But, since I do need it, here are my questions...

Can I embed an IE activex control in a webpage? I basically would like to
be able to embed the same component used to create IE-based browsers into a
webpage.

Since IE is already on Windows PCs already, would they have to load or
register the component? I wouldn't think so.

Can I put it in a DIV that will resize with the page?

I Googled for an example of doing this (embedding an IE webbrowser control
in a freakin' webpage), but have come up dry so far. Anybody know of any
code showing such lunacy?

Thanks for your help!

jim


14 Answers

Michael Robinson

9/14/2007 2:29:00 PM

0

jim wrote:
> OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking
> about it. I swear....if I didn't need this job, I'd tell 'em where to embed
> their webbrowser control. But, since I do need it, here are my questions...
>
> Can I embed an IE activex control in a webpage? I basically would like to
> be able to embed the same component used to create IE-based browsers into a
> webpage.
>
> Since IE is already on Windows PCs already, would they have to load or
> register the component? I wouldn't think so.
>
> Can I put it in a DIV that will resize with the page?
>
> I Googled for an example of doing this (embedding an IE webbrowser control
> in a freakin' webpage), but have come up dry so far. Anybody know of any
> code showing such lunacy?
>
> Thanks for your help!
>
> jim
>
>

What is the goal? Wouldn't you get the same effect by just embedding the
activex control directly rather than embedding the IE control and
loading the activex control in it?

--
http://weblog.mkro...

unknown

9/14/2007 3:23:00 PM

0

yes, though the users may be warned about running an active/x control.

you can get the same effect with an iframe (which is really a seperate
ie instance and has most of the same events).

you can put an iframe or active/x control in a div, but they will not
resize on their own. you will need client script to size them.

-- bruce (sqlwork.com)

jim wrote:
> OK...Don't ask why - it'll just make ya mad. It makes me mad just thinking
> about it. I swear....if I didn't need this job, I'd tell 'em where to embed
> their webbrowser control. But, since I do need it, here are my questions...
>
> Can I embed an IE activex control in a webpage? I basically would like to
> be able to embed the same component used to create IE-based browsers into a
> webpage.
>
> Since IE is already on Windows PCs already, would they have to load or
> register the component? I wouldn't think so.
>
> Can I put it in a DIV that will resize with the page?
>
> I Googled for an example of doing this (embedding an IE webbrowser control
> in a freakin' webpage), but have come up dry so far. Anybody know of any
> code showing such lunacy?
>
> Thanks for your help!
>
> jim
>
>

Mike

9/14/2007 5:08:00 PM

0

Even though you said "Don't ask why - it'll just make ya mad".

I'm curious on why in the world would you want the IE control embedded in a
web page?



"jim" <jim@home.net> wrote in message
news:oXvGi.65990$Lu.63748@bignews8.bellsouth.net...
> OK...Don't ask why - it'll just make ya mad. It makes me mad just
> thinking about it. I swear....if I didn't need this job, I'd tell 'em
> where to embed their webbrowser control. But, since I do need it, here
> are my questions...
>
> Can I embed an IE activex control in a webpage? I basically would like to
> be able to embed the same component used to create IE-based browsers into
> a webpage.
>
> Since IE is already on Windows PCs already, would they have to load or
> register the component? I wouldn't think so.
>
> Can I put it in a DIV that will resize with the page?
>
> I Googled for an example of doing this (embedding an IE webbrowser control
> in a freakin' webpage), but have come up dry so far. Anybody know of any
> code showing such lunacy?
>
> Thanks for your help!
>
> jim
>
>


jim

9/14/2007 11:48:00 PM

0


"Michael Robinson" <mkr@mkronline.com> wrote in message
news:696ab$46ea9ab6$438cc35d$11332@ALLTEL.NET...
> jim wrote:
>> OK...Don't ask why - it'll just make ya mad. It makes me mad just
>> thinking about it. I swear....if I didn't need this job, I'd tell 'em
>> where to embed their webbrowser control. But, since I do need it, here
>> are my questions...
>>
>> Can I embed an IE activex control in a webpage? I basically would like
>> to be able to embed the same component used to create IE-based browsers
>> into a webpage.
>>
>> Since IE is already on Windows PCs already, would they have to load or
>> register the component? I wouldn't think so.
>>
>> Can I put it in a DIV that will resize with the page?
>>
>> I Googled for an example of doing this (embedding an IE webbrowser
>> control in a freakin' webpage), but have come up dry so far. Anybody
>> know of any code showing such lunacy?
>>
>> Thanks for your help!
>>
>> jim
>>
>>
>
> What is the goal? Wouldn't you get the same effect by just embedding the
> activex control directly rather than embedding the IE control and loading
> the activex control in it?

The goal (as crazy as it sounds) is actually to have a web page with a
webbrowser control on it.

As far as I can tell (with the horrifically vague set of user specs I have
been given) the goal of the webpage is to teach veiwers how to use an
activex control in a webpage using the webbrowser control. From what I have
been able to glean from this jumble of specs, the end goal for this web page
is to tie together form and webform programming and move on to other activeX
controls in later lessons.

The idea of using the webbrowser control was one thought up by senior
management (who, of course, still can't program the time on their
microwaves). Evidentally the "big boss" thought it would be "cool" to host
one control inside another and the webbrowser control was the first thing
that fell from his crumbling grey mass.

I was assigned this task because they thought it would be a good learning
project for me. (Lucky me.)

Anyway....I have seen some controls hosted in web pages, and they seem to
need some type of class id. Is there a place that I can get this class id?
I assume it would be different for different versions of IE. I also assume
that version 6 of IE would be the most widely distributed version at this
time, and would probably be the one to us.

Know of any code samples that would show hosting activex controls in a div
or adding/removing activex controls dynamically? A dynamically created,
DIV-encased, hosted webbrowser control would be the holy grail of code
samples for this project.

I am Googling my butt off, but have not found a single example of a
webbrowser control being hosted in a web page.

Thanks so much for your help.

jim


jim

9/14/2007 11:52:00 PM

0


"bruce barker" <nospam@nospam.com> wrote in message
news:OjWPGNu9HHA.1212@TK2MSFTNGP05.phx.gbl...
> yes, though the users may be warned about running an active/x control.

Even though it it already loaded and registered on their PC?

>
> you can get the same effect with an iframe (which is really a seperate ie
> instance and has most of the same events).

I think one of the goals of this project is to show the use of the
webbrowser control on a form and a web page and to show how the control can
be used exactly the same on both (with the same events, functions, etc.).

> you can put an iframe or active/x control in a div, but they will not
> resize on their own. you will need client script to size them.

Got it. Got any cool DIV resize code that I could learn from?

>
> -- bruce (sqlwork.com)
>
> jim wrote:
>> OK...Don't ask why - it'll just make ya mad. It makes me mad just
>> thinking about it. I swear....if I didn't need this job, I'd tell 'em
>> where to embed their webbrowser control. But, since I do need it, here
>> are my questions...
>>
>> Can I embed an IE activex control in a webpage? I basically would like
>> to be able to embed the same component used to create IE-based browsers
>> into a webpage.
>>
>> Since IE is already on Windows PCs already, would they have to load or
>> register the component? I wouldn't think so.
>>
>> Can I put it in a DIV that will resize with the page?
>>
>> I Googled for an example of doing this (embedding an IE webbrowser
>> control in a freakin' webpage), but have come up dry so far. Anybody
>> know of any code showing such lunacy?
>>
>> Thanks for your help!
>>
>> jim
>>

jim

9/14/2007 11:53:00 PM

0


"Mike" <Mike@community.nospam.com> wrote in message
news:OuWniHv9HHA.5164@TK2MSFTNGP05.phx.gbl...
> Even though you said "Don't ask why - it'll just make ya mad".
>
> I'm curious on why in the world would you want the IE control embedded in
> a web page?

The goal (as crazy as it sounds) is actually to have a web page with a
webbrowser control on it.

As far as I can tell (with the horrifically vague set of user specs I have
been given) the goal of the webpage is to teach veiwers how to use an
activex control in a webpage using the webbrowser control. From what I have
been able to glean from this jumble of specs, the end goal for this web page
is to tie together form and webform programming and move on to other activeX
controls in later lessons.

The idea of using the webbrowser control was one thought up by senior
management (who, of course, still can't program the time on their
microwaves). Evidentally the "big boss" thought it would be "cool" to host
one control inside another and the webbrowser control was the first thing
that fell from his crumbling grey mass.

I was assigned this task because they thought it would be a good learning
project for me. (Lucky me.)

Anyway....I have seen some controls hosted in web pages, and they seem to
need some type of class id. Is there a place that I can get this class id?
I assume it would be different for different versions of IE. I also assume
that version 6 of IE would be the most widely distributed version at this
time, and would probably be the one to us.

Know of any code samples that would show hosting activex controls in a div
or adding/removing activex controls dynamically? A dynamically created,
DIV-encased, hosted webbrowser control would be the holy grail of code
samples for this project.

I am Googling my butt off, but have not found a single example of a
webbrowser control being hosted in a web page.

Thanks so much for your help.

jim


Göran Andersson

9/15/2007 11:08:00 AM

0

jim wrote:
>> What is the goal? Wouldn't you get the same effect by just embedding the
>> activex control directly rather than embedding the IE control and loading
>> the activex control in it?
>
> The goal (as crazy as it sounds) is actually to have a web page with a
> webbrowser control on it.
>
> As far as I can tell (with the horrifically vague set of user specs I have
> been given) the goal of the webpage is to teach veiwers how to use an
> activex control in a webpage using the webbrowser control. From what I have
> been able to glean from this jumble of specs, the end goal for this web page
> is to tie together form and webform programming and move on to other activeX
> controls in later lessons.
>
> The idea of using the webbrowser control was one thought up by senior
> management (who, of course, still can't program the time on their
> microwaves). Evidentally the "big boss" thought it would be "cool" to host
> one control inside another and the webbrowser control was the first thing
> that fell from his crumbling grey mass.

In other words, there is no real goal at all. You are just doing it
because someone thought that it should be cool.

I can't help to think that it would be confusing to use a webbrowser
control as an example. Web programming is complicated enough, without
having a browser in the browser.

I really think that you should suggest to use a different control as an
example. A control that has even the slightest possibility to actually
be useful in a web page.

> I was assigned this task because they thought it would be a good learning
> project for me. (Lucky me.)
>
> Anyway....I have seen some controls hosted in web pages, and they seem to
> need some type of class id. Is there a place that I can get this class id?
> I assume it would be different for different versions of IE. I also assume
> that version 6 of IE would be the most widely distributed version at this
> time, and would probably be the one to us.
>
> Know of any code samples that would show hosting activex controls in a div
> or adding/removing activex controls dynamically?> A dynamically created,
> DIV-encased, hosted webbrowser control would be the holy grail of code
> samples for this project.
>
> I am Googling my butt off, but have not found a single example of a
> webbrowser control being hosted in a web page.

That's because they aren't. I have never ever even heard of anyone
wanting to do this, as it's entirely pointless.

--
Göran Andersson
_____
http://www...

Phil H

9/15/2007 10:27:00 PM

0

On 15 Sep, 00:52, "jim" <j...@home.net> wrote:
> "Mike" <M...@community.nospam.com> wrote in message
>
> news:OuWniHv9HHA.5164@TK2MSFTNGP05.phx.gbl...
>
> > Even though you said "Don't ask why - it'll just make ya mad".
>
> > I'm curious on why in the world would you want the IE control embedded in
> > a web page?
>
> The goal (as crazy as it sounds) is actually to have a web page with a
> webbrowser control on it.
>
> As far as I can tell (with the horrifically vague set of user specs I have
> been given) the goal of the webpage is to teach veiwers how to use an
> activex control in a webpage using the webbrowser control. From what I have
> been able to glean from this jumble of specs, the end goal for this web page
> is to tie together form and webform programming and move on to other activeX
> controls in later lessons.
>
> The idea of using the webbrowser control was one thought up by senior
> management (who, of course, still can't program the time on their
> microwaves). Evidentally the "big boss" thought it would be "cool" to host
> one control inside another and the webbrowser control was the first thing
> that fell from his crumbling grey mass.
>
> I was assigned this task because they thought it would be a good learning
> project for me. (Lucky me.)
>
> Anyway....I have seen some controls hosted in web pages, and they seem to
> need some type of class id. Is there a place that I can get this class id?
> I assume it would be different for different versions of IE. I also assume
> that version 6 of IE would be the most widely distributed version at this
> time, and would probably be the one to us.
>
> Know of any code samples that would show hosting activex controls in a div
> or adding/removing activex controls dynamically? A dynamically created,
> DIV-encased, hosted webbrowser control would be the holy grail of code
> samples for this project.
>
> I am Googling my butt off, but have not found a single example of a
> webbrowser control being hosted in a web page.
>
> Thanks so much for your help.
>
> jim

Hi Jim

You have my sympathies if you are being driven by a boss who asks the
impossible because he/she doesn't know what he/she is talking about.

The best approach is to go back and agree what the actual (broader)
objective is and allow you to find the best solution.

I think you need to make it clear what the difference is between
client-side and server-side technology. ASP.NET uses Java-script to
create intelligent client-side behaviour to avoid round-trips (e.g.
validation controls) but it is not equipped to go much beyond that.
Active-X control simulation is not in its porfolio.

Unless of course anyone knows any different, but I doubt it.

jim

9/16/2007 5:40:00 AM

0


"Göran Andersson" <guffa@guffa.com> wrote in message
news:%23ywl8i49HHA.1212@TK2MSFTNGP05.phx.gbl...
> jim wrote:
>>> What is the goal? Wouldn't you get the same effect by just embedding the
>>> activex control directly rather than embedding the IE control and
>>> loading the activex control in it?
>>
>> The goal (as crazy as it sounds) is actually to have a web page with a
>> webbrowser control on it.
>>
>> As far as I can tell (with the horrifically vague set of user specs I
>> have been given) the goal of the webpage is to teach veiwers how to use
>> an activex control in a webpage using the webbrowser control. From what
>> I have been able to glean from this jumble of specs, the end goal for
>> this web page is to tie together form and webform programming and move on
>> to other activeX controls in later lessons.
>>
>> The idea of using the webbrowser control was one thought up by senior
>> management (who, of course, still can't program the time on their
>> microwaves). Evidentally the "big boss" thought it would be "cool" to
>> host one control inside another and the webbrowser control was the first
>> thing that fell from his crumbling grey mass.
>
> In other words, there is no real goal at all. You are just doing it
> because someone thought that it should be cool.
>
> I can't help to think that it would be confusing to use a webbrowser
> control as an example. Web programming is complicated enough, without
> having a browser in the browser.
>
> I really think that you should suggest to use a different control as an
> example. A control that has even the slightest possibility to actually be
> useful in a web page.

I *so* agree with you. I suggested a date picker control. It is useful in
both places, consumes less resources and is less confusing than this puzzle
wrapped in an enigma of a webpage that some (I hope) drunken manager
scribbled onto a bar napkin.

>
>> I was assigned this task because they thought it would be a good learning
>> project for me. (Lucky me.)
>>
>> Anyway....I have seen some controls hosted in web pages, and they seem to
>> need some type of class id. Is there a place that I can get this class
>> id? I assume it would be different for different versions of IE. I also
>> assume that version 6 of IE would be the most widely distributed version
>> at this time, and would probably be the one to us.
>>
>> Know of any code samples that would show hosting activex controls in a
>> div or adding/removing activex controls dynamically?> A dynamically
>> created, DIV-encased, hosted webbrowser control would be the holy grail
>> of code samples for this project.
>>
>> I am Googling my butt off, but have not found a single example of a
>> webbrowser control being hosted in a web page.
>
> That's because they aren't. I have never ever even heard of anyone wanting
> to do this, as it's entirely pointless.

The only point here that I can see is keeping my job. Doing this is like
placing a calendar control inside another calendar control. Maybe you could
do it, but why would you?

Sometimes I think that people just get drunk with power and the "do it
because I say so" rule goes into effect. That seems to be the case here.

jim


jim

9/16/2007 5:43:00 AM

0


"Phil H" <google@philphall.me.uk> wrote in message
news:1189895190.422166.205140@o80g2000hse.googlegroups.com...
> On 15 Sep, 00:52, "jim" <j...@home.net> wrote:
>> "Mike" <M...@community.nospam.com> wrote in message
>>
>> news:OuWniHv9HHA.5164@TK2MSFTNGP05.phx.gbl...
>>
>> > Even though you said "Don't ask why - it'll just make ya mad".
>>
>> > I'm curious on why in the world would you want the IE control embedded
>> > in
>> > a web page?
>>
>> The goal (as crazy as it sounds) is actually to have a web page with a
>> webbrowser control on it.
>>
>> As far as I can tell (with the horrifically vague set of user specs I
>> have
>> been given) the goal of the webpage is to teach veiwers how to use an
>> activex control in a webpage using the webbrowser control. From what I
>> have
>> been able to glean from this jumble of specs, the end goal for this web
>> page
>> is to tie together form and webform programming and move on to other
>> activeX
>> controls in later lessons.
>>
>> The idea of using the webbrowser control was one thought up by senior
>> management (who, of course, still can't program the time on their
>> microwaves). Evidentally the "big boss" thought it would be "cool" to
>> host
>> one control inside another and the webbrowser control was the first thing
>> that fell from his crumbling grey mass.
>>
>> I was assigned this task because they thought it would be a good learning
>> project for me. (Lucky me.)
>>
>> Anyway....I have seen some controls hosted in web pages, and they seem to
>> need some type of class id. Is there a place that I can get this class
>> id?
>> I assume it would be different for different versions of IE. I also
>> assume
>> that version 6 of IE would be the most widely distributed version at this
>> time, and would probably be the one to us.
>>
>> Know of any code samples that would show hosting activex controls in a
>> div
>> or adding/removing activex controls dynamically? A dynamically created,
>> DIV-encased, hosted webbrowser control would be the holy grail of code
>> samples for this project.
>>
>> I am Googling my butt off, but have not found a single example of a
>> webbrowser control being hosted in a web page.
>>
>> Thanks so much for your help.
>>
>> jim
>
> Hi Jim
>
> You have my sympathies if you are being driven by a boss who asks the
> impossible because he/she doesn't know what he/she is talking about.
>
> The best approach is to go back and agree what the actual (broader)
> objective is and allow you to find the best solution.
>
> I think you need to make it clear what the difference is between
> client-side and server-side technology. ASP.NET uses Java-script to
> create intelligent client-side behaviour to avoid round-trips (e.g.
> validation controls) but it is not equipped to go much beyond that.
> Active-X control simulation is not in its porfolio.
>
> Unless of course anyone knows any different, but I doubt it.

Thanks for the sound advice. Unfortunately sound advice is only useful when
dealing with beings capable of logical thought.

What *should* have happened was that management should have come up with a
goal and left it to the project leaders and workers to accomplish the goal.
Micromanagement like this will kill morale - and eventually the company.

Still looking though.....

jim