Checking whether or not checkbox on web page is checked

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?
 
P

Peter Morris

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/
=========================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top