Q:

How to set a select box/drop down menu and a checkbox using VB.Net

I have created a BHO for automatically filling out forms on a specific website.
This is the website I am using to test:
https://signup.live.com/signup.aspx?lic=1
I am able to fill out text boxes with no problem, but I am having some issues with drop-down menus and checkboxes.
This is the code I am using for textboxes, this works great:
objElement = objHTMLDocument.getElementById("iFirstName")
objElement.setAttribute("value", "TEST")

This is what I am using for the combobox/select/drop-down menu:
objElement = objHTMLDocument.getElementById("iCountry")
objElement.setAttribute("value", "Canada")

This code just changes the value being shown from the default "United States" to being blank (but it does change the value for Country Code to Canada (+1) (so I'm not sure what is happening here?)
And finally, I cannot figure out how to set the checkbox at the bottom of the page to be unchecked.  This is what I have:
objElement = objHTMLDocument.getElementById("iOptinEmailContainer")
objElement.setAttribute("checked", "1")

I have tried both setting it to 1 and 0 and both end up in the checkbox still being checked.
Any ideas as to what could be my issue?
Thanks in advance!

A:

Check the HTML of the site and you'll see that the value for Canada is "CA"
objElement = objHTMLDocument.getElementById("iCountry")
objElement.setAttribute("value", "CA")

objElement = objHTMLDocument.getElementById("iOptinEmailContainer")
objElement.setAttribute("checked", "checked")
'or >> objElement.setAttribute("checked", "unchecked")

