|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
AxWebBrowser1 and code behind redirectingHi
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" <notmyfirstn***@planet.nl> wrote in message news:<eeSiKO4PFHA.1500@TK2MSFTNGP09.phx.gbl>... I'm sorry but I don't understand what your saying. Could you explain that> \\\ > Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp, _ > SHDocVw.WebBrowser) > myArraylistDocuments.Add(wb.Document) > /// 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 Cor Ligthert wrote:
> Foldface correction from a wrong formatted text while sending.> > Did you look at the message before this. The message you showed is a > Sorry, I saw both messages but what I was asking was what this actually> Cor means? I just couldn't understand what it was trying to accomplish. It looks like your just adding the document to your own private list. Incidently I'm a c# coder rather than a VB coder. I can read the code but if myArraylistDocuments means something other than a local variable I wouldn't know. I can't just try it because I can't understand it. Thanks for the response F > This I wrote> Sorry, I saw both messages but what I was asking was what this actually > means? I just couldn't understand > what it was trying to accomplish. It looks like your just adding the > document to your own > private list. >>Therefore what I do for frames is set them as documents in an arraylist When you don't understand it, than I tell it in another way>>every time this event fires. A Webpage can exist as more frames. What I do is set the received documents (which can be a part of a webpage by instance frames) as document in an arraylist (which is an IList implementing class). After that I process the documents in the arraylist. I assume that it will take as well more documents as those exist because of a redirect. However, that I never tried. This is the code I use for that in VBNet inside the documentcomplete event of a AXwebbrowser. Dim wb As SHDocVw.WebBrowser = DirectCast(e.pDisp, _ SHDocVw.WebBrowser) myArraylistDocuments.Add(wb.Document) >Incidently I'm a c# coder rather than a VB coder Although it is very easy for me to translate this in C#, is it something I do not do in this language.vb newsgroup. Than you would have asked this question in newsgroups like dotnet.general or dotnet.languages.csharp. The only difference is by the way the declaration and the cast SHDocVW.WebBrowser wb = (SHDocVW.Webbrowser) e.pDisp; Anyway I hope this helps, Cor
ASCII lookup table
Datagrid resizing rows on sort - not wanted Datagrid - shown vertically instead of horizontally? Reading from a ini-file and run a program How do I measure the time it takes to copy a file? Easy one about web forms Assigning a Null to Datetime Variable or Object step by step guide to databinding? form location Registering my program as default for my file extension |
|||||||||||||||||||||||