Hi, I encounter this error when trying to run my .aspx page. I believe the error comes from the line
chkbx = cblSportsInterest
Here's the codes for my code behind:
Public Sub InsertDetails()
Dim strConn = ConfigurationManager.ConnectionStrings("TixToYOGDBConnectionString").ConnectionString
Dim cmdd = "Insert into ContestSportsInterest Values (@FullName,@Email,@SportsInterest,@EmailUpdates)"
Dim myConn As New SqlConnection(strConn)
myConn.Open()
Dim i As Integer
Dim chkbx As CheckBoxList
chkbx = cblSportsInterest
Dim sb As StringBuilder = New StringBuilder()
For i = 0 To chkbx.Items.Count - 1
If chkbx.Items(i).Selected Then
sb.Append(chkbx.Items(i).Value & ",")
End If
Next
'Create the value to be ...
Go to the complete details ...