|
-
Nov 25th, 2009, 02:13 AM
#1
Thread Starter
Addicted Member
System.NullReferenceException
Function GetHtml(ByVal url As String, ByRef web As WebBrowser) As String
Dim WebString As String
Dim myURI As New Uri(url)
web.Url = myURI
WebString = web.Document.Body.InnerHtml
Return WebString
End Function
System.NullReferenceException!!!
AS Above !! How to solve it!! Thank!!
-
Nov 25th, 2009, 02:38 AM
#2
Re: System.NullReferenceException
Which line?
Regardless of anything else, don't pass your WebBrowser ByRef. There's no reason to.
-
Nov 25th, 2009, 07:57 AM
#3
Thread Starter
Addicted Member
Re: System.NullReferenceException
Thank, I found the problem is the "browser loading " Bcos the browser not d/l completed .
, the browser still blank and i used to get the innerhtml with blank document!! so got the error message!, !! thank!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|