john walker

john walker

  • NA
  • 1
  • 15.4k

Please help me with checkboxes. Ive been stuck on this for four hours.

Nov 26 2010 2:15 AM
Hi guys

I'm trying to make a autofilling web browser on c# and their is a checkbox I need to check.
The web id of it is cb_rules_agree and I cant work out how to automatically click the textbox when i load the web browser through c#.
I tried this but it didnt work
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
 {
webBrowser.Document.GetElementById("cb_rules_agree").SetAttribute("value", checkbox.check);
}

If someone could tell me how to automatically set the checkbox and checked I would be very very grateful.

Thanks John

Answers (1)