shdocvw.internetexplorer object help

Discussion in 'ASP .Net' started by Ryan Clark, Jan 6, 2004.

  1. Ryan Clark

    Ryan Clark Guest

    I'm trying to finish up an ASP.Net application but one requirement has got
    me stumped. I have a databound listbox that contains my information. The
    requirement is to open up another instance of IE that shows detailed
    information about the selected item in the listbox.

    I've tried using JavaScript to handle a new "double click" event on the
    listbox, but the problem is that setting the javascript arguments requires a
    roundtrip to the server and "fails" if the user double clicks a different
    item than originally selected. I use the term "fails" loosely here. It
    actually works but sends the wrong information to the second (or subsequent)
    instance of IE.

    I'm trying to use COM now to open up a new IE browser. The code to create a
    new IE application doesn't give me any errors, and I see a new iexplore.exe
    process owned by my ASPNET user in the task manager (and it appears to be
    busy at times) but I don't get a new window, nor does it show up in my
    current window.

    At this point, I don't really care how I accomplish this. I'm not too handy
    with client-side programming, so if that's the answer here, I need some
    direction.

    If anyone's got any experience with this sort of thing, or can lend a hand
    at all, your help would be greatly appreciated.

    Here's the barebones code I'm trying to execute:

    ie = New SHDocVw.InternetExplorer()

    ie.Visible = True

    ie.Navigate("http://localhost/details.aspx",
    BrowserNavConstants.navOpenInNewWindow, "_BLANK")


    Regards,

    Ryan Clark
     
    Ryan Clark, Jan 6, 2004
    #1
    1. Advertising

  2. Ryan Clark wrote:

    > I've tried using JavaScript to handle a new "double click" event on the
    > listbox, but the problem is that setting the javascript arguments requires a
    > roundtrip to the server and "fails" if the user double clicks a different
    > item than originally selected. I use the term "fails" loosely here. It
    > actually works but sends the wrong information to the second (or subsequent)
    > instance of IE.
    >


    I would think this approach would work. Why can't you set the value of
    each item in the listbox to be some concatenated value, the args you
    need to pass and the actual value? If you'd rather postback, on the
    postback you should be able to register your client script to do this.
    I would try to make that approach work before dealing with the Microsoft
    Web Browser. That ActiveX control is very clunky, not to mention
    security headaches you might hit, plus it's not portable to different
    types of clients (Mozilla, etc.).

    --
    Craig Deelsnyder
    Microsoft MVP - ASP.NET
     
    Craig Deelsnyder, Jan 6, 2004
    #2
    1. Advertising

  3. Ryan Clark

    Ryan Clark Guest

    Craig,

    It's good that you agree with my original approach. Maybe I'm just doing
    things out of order since it's not working like I'd expect.

    The biggest problem is that double clicking is always one step behind.
    So, for example, if my list contains numbers 1-10 and I double click
    '2', the very first time the javascript won't have any data until the
    page reposts. Then, if I double click '4', the new window will appear
    but with the detail for '2'.

    How can I get around this?

    Thanks,

    Ryan



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Ryan Clark, Jan 6, 2004
    #3
  4. Ryan Clark

    quantum Guest

    Hi Ryan,
    I have been looking for information on SHDocVW.InternetExplorer to us
    in my vb.net windows application (not ASP)
    I still have doubts and maybe I won't be able to use it for my purpose
    But I was able to display a page. For my first trial I use
    "http:\\yahoo.com" and it worked. Then I displayed a page in "M
    Documents" folder. As a matter of fact the first time I didn't se
    anything because I had not set the "visible" property.
    There is an example using C# in C:\Progra
    Files\MicrosoftVisualStudio\SDK\v1.1\Samples\Technologies\Interop\BAsic\InternetExplorer
    (if you are using Visual Studio)
    There is a vb.net sample in "www.vbfrance.com/code.aspx?ID=5591". Thi
    is in French, but even if you don't understand French you may be abl
    to get something out of it.
    Good Luck

    quantu
    -----------------------------------------------------------------------
    Posted via http://www.mcse.m
    -----------------------------------------------------------------------
    View this thread: http://www.mcse.ms/message250419.htm
     
    quantum, Feb 2, 2004
    #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. quantum

    Using SHDocVW-InternetExplorer

    quantum, Feb 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,387
    quantum
    Feb 2, 2004
  2. =?Utf-8?B?am9zZQ==?=

    shdocvw

    =?Utf-8?B?am9zZQ==?=, Jun 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    553
    Scott Allen
    Jun 4, 2005
  3. Ersin Gençtürk
    Replies:
    0
    Views:
    329
    Ersin Gençtürk
    Oct 9, 2005
  4. Lars-Erik Aabech
    Replies:
    4
    Views:
    2,738
    Steven Cheng[MSFT]
    Nov 3, 2005
  5. Richard Bell
    Replies:
    19
    Views:
    5,534
    Carlos Oliva
    Feb 20, 2004
Loading...

Share This Page