AxWebBrowser1 and code behind redirecting

  • Thread starter Thread starter foldface
  • Start date Start date
F

foldface

Hi
I'm using the AxWebBrowser1 control. I use the
event DocumentComplete to tell when a document has downloaded
which works fine, except when thw web page does something
like this:

HttpContext.Current.Response.Redirect(url, true);

I can't seem to find an event on the AxWebBrowser1 control that fires
in this case.
I could setup a heartbeat thread to detect when the page changes
but thats a hack fix, is there a good way of doing this?

ta
f
 
Foldface.

A document complete fires when there is any frame downloaded. A document is
not a page, however a frame.

Therefore what I do for frames is set them as documents in an arraylist
every time this event fires.
\\\

Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp,
SHDocVw.WebBrowser)myArraylistDocuments.Add(wb.Document)

///

I don't know if that takes as well the redirected pages and am therefore
curious about that.

Cor
 
\\\
Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp, _
SHDocVw.WebBrowser)
myArraylistDocuments.Add(wb.Document)
///
 
Cor Ligthert said:
\\\
Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp, _
SHDocVw.WebBrowser)
myArraylistDocuments.Add(wb.Document)
///

I'm sorry but I don't understand what your saying. Could you explain that
again? What your doing and what you expect the affect to be?

thanks for the response

f
 
Foldface

Did you look at the message before this. The message you showed is a correction from a wrong formatted text while sending.

Cor
 
SHDocVW.WebBrowser wb = (SHDocVW.Webbrowser) e.pDisp;

This doesn't seem to work, the cast doesn't work. Still not sure what
you think will happen with this though

However I tried placing a breakpoint in PreRender for the base web page
and a breakpoint in the Document.Load in the other program. The sequence went

Base.PreRender
DocumentLoad fired
Base.PreRender
DocumentLoad fired
Base.PreRender (redirect occurs)
Base.PreRender

so the document load is never fired in this case

thanks for the help

f
 

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

Back
Top