i'm binding mostly textboxes, and dropdown lists & checkboxes to web forms. I have all of the textboxes binded, however, I'm having trouble binding the checkboxes. It will not let me bind them the same way i am binding my textboxes. On my web forms I am displaying records from a Microsoft Access database, and I want to have the checkboxes unchecked or checked according to the records in the database.
Here is how I have my textboxes binded, and if anyone can help me bind my checkboxes, i would greatly appreciate it...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
daContacts.Fill(DsContacts1)
txtCompany.DataBind()
txtID.DataBind()
txtSal.DataBind()
txtUpdated.DataBind()
txtFirst.DataBind()
txtMiddle.DataBind()
txtLast.DataBind()
txtSuffix.DataBind()
txtTitle.DataBind()
txtAdd1.DataBind()
txtAdd2.DataBind()
txtCity.DataBind()
txtState.DataBind()
txtZip.DataBind()
txtPhone.DataBind()
txtExt.DataBind()
txt800.DataBind()
txtFax.DataBind()
txtEmail.DataBind()
txtWeb.DataBind()
txtComments.DataBind()
End If
End Sub
Here is how I have my textboxes binded, and if anyone can help me bind my checkboxes, i would greatly appreciate it...
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
daContacts.Fill(DsContacts1)
txtCompany.DataBind()
txtID.DataBind()
txtSal.DataBind()
txtUpdated.DataBind()
txtFirst.DataBind()
txtMiddle.DataBind()
txtLast.DataBind()
txtSuffix.DataBind()
txtTitle.DataBind()
txtAdd1.DataBind()
txtAdd2.DataBind()
txtCity.DataBind()
txtState.DataBind()
txtZip.DataBind()
txtPhone.DataBind()
txtExt.DataBind()
txt800.DataBind()
txtFax.DataBind()
txtEmail.DataBind()
txtWeb.DataBind()
txtComments.DataBind()
End If
End Sub