Ok guys. Im trying to grab a HTML element style with my program, the problem is that when the page is loaded there is no style to that element, then if I click on that element and it has a style.
I have this
vb.net Code:
With WebBrowser1 If .Document.GetElementById("idSUOther9").Style is Nothing Then .Document.GetElementById("i1668").InvokeMember("click") End If If .Document.GetElementById("idSUOther9").Style Is "display: none;" Then .Document.GetElementById("i0116") .Document.GetElementById("i0118") End If tLogin.Stop() MessageBox.Show(.Document.GetElementById("idSUOther9").Style) Return
then my program crashes here
vb.net Code:
If .Document.GetElementById("idSUOther9").Style is Nothing Then .Document.GetElementById("i1668").InvokeMember("click") End If
since idSUOther9 there is no style it cant grab its data. How can I check is "idSUOther9" has a style without crashing my program?
Thank you




Reply With Quote