Can someone please show me a compatible way to write this so its compatible with Option Strict On? I rewrote most of my application with Option Strict Off and the below is given me issues.
Code is:
Problems raised with OS On, Errors Are:
targetElement As HtmlElement = Option Strict On disallows implicit conversions from 'Object' to 'System.Windows.Forms.HtmlElement
myTargetElement(0) = Late binding
myTargetElement(0).InnerText = Late binding
What other ways could i write this which are compatible with OS on?
Code is:
Code:
Dim myTargetElement = (From targetElement As HtmlElement In WebBrowser1.Document.GetElementsByTagName("div")
Where targetElement.GetAttribute("className") = "guid"
Select targetElement)
'Thread.Sleep(2000)
If myTargetElement(0) IsNot Nothing Then
Guid.Text = myTargetElement(0).InnerTexttargetElement As HtmlElement = Option Strict On disallows implicit conversions from 'Object' to 'System.Windows.Forms.HtmlElement
myTargetElement(0) = Late binding
myTargetElement(0).InnerText = Late binding
What other ways could i write this which are compatible with OS on?