Dim unclean As HtmlDocument = MyWebBrowser.Document
Dim clean As String = unclean.ToString
Dim bad1 As String = "target='_blank'"
Dim bad2 As String = "target=""_blank"""
If clean.Contains(bad1) Or clean.Contains(bad2) Then
clean = clean.Replace(clean, bad1)
clean = clean.Replace(clean, bad2)
End If
Me.MyWebBrowser.DocumentText = clean
System.Windows.Forms.HtmlDocument
/*In order to get back all html content in a webbrowser*/
Dim contents As String = WebBrowser1.DocumentText
/*Your code
.
.
.
.
NOTE : using to string not always returns the inner text of the specific object
It returns the type, namespace of the object by default*/
PHP:/*In order to get back all html content in a webbrowser*/ Dim contents As String = WebBrowser1.DocumentText /*Your code . . . . NOTE : using to string not always returns the inner text of the specific object It returns the type, namespace of the object by default*/
Dim clean As String = MyWebBrowser.DocumentText
Dim bad1 As String = "target='_blank'"
Dim bad2 As String = "target=""_blank"""
If clean.Contains(bad1) Or clean.Contains(bad2) Then
clean = clean.Replace(" ", bad1)
clean = clean.Replace(" ", bad2)
End If
Me.MyWebBrowser.DocumentText = clean