Open new Internet Explorer window from web service or Web App

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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...
 
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.
 
Back
Top