Checking whether or not checkbox on web page is checked

  • Thread starter Thread starter BobRoyAce
  • Start date Start date
B

BobRoyAce

Let's say that I use the following code to get a reference to a
checkbox on a web page in a WebBrowser control:

Dim oHtmlElement As HtmlElement
oHtmlElement =
WebBrowser1.Document.GetElementById("chkThrowInTheTowel")

How can I tell if the checkbox is checked or not? oHtmlElement.Checked
is not an option, so how would I do this?
 
Can you treat it like a normal text box and see if its value != null?
That's how it posts the data back to the server

<checkbox name="Hello" Value="yes"/>

Comes back as null or "yes"




--
Pete
=========================================
I use Enterprise Core Objects (Domain driven design)
http://www.capableobjects.com/
=========================================
 
Back
Top