vb.net Code:
Private Sub CheckUncheckAll(ByVal newState As String)
For Each input As HtmlElement In Me.WebBrowser1.Document.GetElementsByTagName("input")
If input.GetAttribute("type") = "checkbox" Then
input.SetAttribute("checked", newState)
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Button1.Text = "Check All" Then
CheckUncheckAll("true")
Button1.Text = "Uncheck All"
Else
CheckUncheckAll("false")
Button1.Text = "Check All"
End If
End Sub