R
Randall Arnold
I'm creating a VB 2005 Express app that hosts the webbrowser control. Everything works well except one area: the Navigating event.
In that event, I need to evaluate the URL property of the webbrowser object. The URL is set beforehand in the browser object. I'm using Webbrowser1.URL.ToString to check it. However, I get the following error when I try this:
"A first chance exception of type 'System.NullReferenceException' occurred in (my program name)"
I created a test conditional to evaluate the URL property, as so:
If IsDBNull(Webbrowser1.Url) Then
MsgBox("null url")
Else
MsgBox("not null url")
End If
The result is that the URL is not null-- yet I get the error message above anyway!
Any clues on how to handle this?
Thanks,
Randall Arnold
In that event, I need to evaluate the URL property of the webbrowser object. The URL is set beforehand in the browser object. I'm using Webbrowser1.URL.ToString to check it. However, I get the following error when I try this:
"A first chance exception of type 'System.NullReferenceException' occurred in (my program name)"
I created a test conditional to evaluate the URL property, as so:
If IsDBNull(Webbrowser1.Url) Then
MsgBox("null url")
Else
MsgBox("not null url")
End If
The result is that the URL is not null-- yet I get the error message above anyway!
Any clues on how to handle this?
Thanks,
Randall Arnold