I think what's happening (based on some experimenting) is that the code is progressing much faster than the website is loading. Therefore there is no url in place(it's undefined since the site hasn't loaded) by the time execution gets to your if statement.
Check out the DocumentCompleted Event of the web browser control: http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documentcompleted.aspx . You can find it by highlighting the web browser control, going over to properties on the right hand side, and double click the cell next to DocumentCompleted. Now do your url comparison within that method. For some odd reason when I tested it with a message box in the DocumentCompleted the box was being displayed twice but you should be able to find a way around that.
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
Xufyan commented: great - xufyan +1
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
WaltP commented: Are you being silly, or are you having a brain fart? ;o) +11
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
jephthah commented: word +0
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster