Open new Internet Explorer window from web service or Web App

G

Guest

i need to open a new internet explorer windows from a Web app i have tried
with this code but it seems not to work, because nothin happens when i call
the application.

using SHDocVw;
using System.Runtime.InteropServices;


SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorer();

SHDocVw.IWebBrowserApp wb = (SHDocVw.IWebBrowserApp) explorer;
wb.Visible = true;

object noValue = System.Reflection.Missing.Value;
wb.Navigate("about:blank", ref noValue, ref noValue, ref noValue, ref
noValue);

any suggestions or code sample would be appreciate.

thanks in advance

PD: i allready trie changing this line
SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorer();
for
SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorerClass();
bur it doesn't seem to work either.
 
C

Curt_C [MVP]

kstriyhon said:
i need to open a new internet explorer windows from a Web app i have tried
with this code but it seems not to work, because nothin happens when i call
the application.

using SHDocVw;
using System.Runtime.InteropServices;


SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorer();

SHDocVw.IWebBrowserApp wb = (SHDocVw.IWebBrowserApp) explorer;
wb.Visible = true;

object noValue = System.Reflection.Missing.Value;
wb.Navigate("about:blank", ref noValue, ref noValue, ref noValue, ref
noValue);

any suggestions or code sample would be appreciate.

thanks in advance

PD: i allready trie changing this line
SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorer();
for
SHDocVw.InternetExplorer explorer = new SHDocVw.InternetExplorerClass();
bur it doesn't seem to work either.

You'll have to pass it to clientside code to open a new window, server
code cant, or will only open an instance of the browser on the server...
 
K

Kevin Spencer

A web app is a client-server app. The browser is on the client. The server
is somewhere else. Since you want to open a browser on the client, you need
to use JavaScript to do it. Hint: Use the JavaScropt window.open() method.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top