Launching URL from usercontrol

  • Thread starter Thread starter Dave Brown
  • Start date Start date
D

Dave Brown

Has anyone successfull launched a URL into a new browser window from a
usercontrol hosted by IE ?

I used the Process.Start() method on my Windows Application using the
usercontrol which works fine but Process.Start throws a security expcetion
when the control is hosted. understandibly.

rgds

Dave.
 
Dave said:
Has anyone successfull launched a URL into a new browser window from a
usercontrol hosted by IE ?

I used the Process.Start() method on my Windows Application using the
usercontrol which works fine but Process.Start throws a security
expcetion when the control is hosted. understandibly.

Launching a browser window from within IE requires client side script. You
could generate the script in your browser control and register it as a
client script block. The script would use the window.open() method to
launch the URL passed into open in a new window.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
I dont want to use Any scripting. This shouldnt be a necessity.
If I deploy my control in an application I wouldnt be using scripting so
just because the control is being hosted in a webpage doesnt mean I should
use scripting.
Or am misunderstanding you entirely... :S...
 
Dave said:
I dont want to use Any scripting. This shouldnt be a necessity.
If I deploy my control in an application I wouldnt be using scripting
so just because the control is being hosted in a webpage doesnt mean
I should use scripting.
Or am misunderstanding you entirely... :S...

The difference is if you deploy your control in an application the
application is launched on the client and has all of the rights of the user
launching the application. A control displayed or hosted in a web browser
doesn't have those types of rights. Think of the security implications if a
web hosted control could invoke any process on the client machine. But you
don't want to invoke any process, you simply want to open another browser
window at a specific URL. There are mechanisms within the object model that
make this quite easy to do. These methods are accessed via client script.
--
Tom Porterfield
MS-MVP MCE
http://support.telop.org

Please post all follow-ups to the newsgroup only.
 
Back
Top