Using Microsoft Web Browser control with windows form in VB.NET 2003
I have problem getting events to work properly, can anyone help me
here,
1. Reading the data from the database, looping through all the rows
and build the XML string and store it in a local file
(c:\temp\file1.htm) and then navigate to this local file. Each HTML
row has name link (using line number as a name).
2. Using the Web Browser onclick and onmouseup events in my project to
overcome the default context menu, I am using custom context menu on
mouse right click.
3. On click I am calling windows form to update the line, after
updating the line I re-create the file and call navigate, at this
stage I want to go to the line on the browser control which I have
edited,
4. Whenever I call navigate with the url c:\temp\file1.htm#<namelink>
control goes to the line and comes back to the first line,
ex: Go to line number 18 >> WebBrowser1.Navigate
("c:\temp\file1.htm#18")
5. Sequences that I have following to navigate to a particular name
link are,
a. Remove browser event handlers' onclick and onmouseup
b. Call navigate with c:\temp\file.htm#18
c. Add browser event handlers for onclick and onmouseup
It does not work always, I don't really know what I am missing here,
and it works only at the first time.
thanks in advance,
sudhakar