shdocvw.internetexplorer object help

R

Ryan Clark

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
 
C

Craig Deelsnyder

Ryan said:
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.).
 
R

Ryan Clark

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
 
Q

quantum

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
 

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

Similar Threads

Problem with window messaging system vc++ 2
Help for a newbie 13
Processing in Python help 0
Help please 8
Help with code 2
Help design HTA 0
Help with popup display 1
I need help making an html website 2

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top