Open new Internet Explorer window from web service or Web App

Discussion in 'ASP .Net' started by =?Utf-8?B?a3N0cml5aG9u?=, Aug 3, 2005.

  1. 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.
    =?Utf-8?B?a3N0cml5aG9u?=, Aug 3, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?a3N0cml5aG9u?=

    Clamps Guest

    response.write("<script
    language=""javascript>window.open("http://your.url");</script>")



    "kstriyhon" <> wrote in message
    news:...
    > 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.
    Clamps, Aug 3, 2005
    #2
    1. Advertising

  3. =?Utf-8?B?a3N0cml5aG9u?=

    Curt_C [MVP] Guest

    kstriyhon wrote:
    > 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...


    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com
    Curt_C [MVP], Aug 3, 2005
    #3
  4. 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.

    "kstriyhon" <> wrote in message
    news:...
    >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.
    Kevin Spencer, Aug 3, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U2FuZHk=?=

    Code to Exit Web App and Exit Internet Explorer

    =?Utf-8?B?U2FuZHk=?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,873
    =?Utf-8?B?U2FuZHk=?=
    Aug 5, 2005
  2. cmay
    Replies:
    0
    Views:
    1,113
  3. Ed Hauptman
    Replies:
    7
    Views:
    991
    Ed Hauptman
    Aug 7, 2009
  4. John Smith
    Replies:
    1
    Views:
    122
    Evertjan.
    Mar 12, 2005
  5. VK
    Replies:
    6
    Views:
    106
Loading...

Share This Page