I have a databound gridview that I have added a checkbox column to. When an end user clicks a submit button I loop through the rows on the gridview and if the checkbox is checked I save some of the gridview values to a SQL backend. It fires correctly and loops through the rows fine but it doesn't seem to see a checked box. I am a novice in asp.net so this may be simple but I am not seeing it.
Here is my code:
For Each row As GridViewRow In Gridview1.Rows
If DirectCast(row.FindControl("mycheckboxcontrol"), System.Web.UI.WebControls.CheckBox).Checked = True Then
'Perform save here
Just to be through here is the top of the .vb file:
Partial Class _Default
Protected WithEvents chkUseContact As Global.System.Web.UI.WebControls.CheckBox