Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > shdocvw.internetexplorer object help

Reply
Thread Tools

shdocvw.internetexplorer object help

 
 
Ryan Clark
Guest
Posts: n/a
 
      01-06-2004
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


 
Reply With Quote
 
 
 
 
Craig Deelsnyder
Guest
Posts: n/a
 
      01-06-2004
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
 
Reply With Quote
 
 
 
 
Ryan Clark
Guest
Posts: n/a
 
      01-06-2004
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!
 
Reply With Quote
 
quantum
Guest
Posts: n/a
 
      02-02-2004

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\Techn ologies\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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
Error !Object reference not set to an instance of an object. !!! Help Parthiv Joshi ASP .Net 2 07-02-2004 10:28 AM
Help! Web Service + XML Object Representatino vs. Real Object Arthur Mnev ASP .Net 0 02-02-2004 06:14 AM
HELP: Object reference not set to an instance of an object Tee ASP .Net 5 12-02-2003 07:21 PM
HELP! Error Loading ASPX : Object Reference not set to an instance object Pedro Correia ASP .Net 0 07-25-2003 10:42 AM



Advertisments