Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged
'TextBox2.Text = GridView1.SelectedRow.Cells(1).Text.ToString
'idcore = TextBox2.Text
'Response.Redirect("WebForm2.aspx")
Dim chkCusID1 As RadioButton
'Dim chkCusID2, chkCusID3, chkCusID4, chkCusID5, chkCusID6, chkCusID7, chkCusID8, chkCusID9 As RadioButton
Dim i As Integer
For i = 0 To GridView1.Rows.Count - 1
chkCusID1 = CType(GridView1.Rows(i).FindControl("c1"), RadioButton)
lblID = CType(GridView1.Rows(i).FindControl("lbl2"), Label)
If chkCusID1.Checked = True Then
'*** Have lblID.Text ***'
Label5.Text = "1.00"
Label7.Text = lblID.Text
insertdetail()
End If
Next
End Sub
Private Sub insertdetail()
Dim idhole As String = ""
Dim sum As Double = 0
Dim crsState As String = ""
Dim sqlAddCrs As String = ""
Dim sqlAddDtl As String = ""
Dim cmd As New SqlCommand
Dim dsChk As New DataSet
Dim addChk As Boolean = True
For i = 0 To GridView1.Rows.Count - 1
sqlAddCrs = "INSERT INTO Score_core VALUES('" & txtRunid.Text & "','" & Label7.Text & "','" & TextEvaluator.Text & "','" & Label5.Text & "','" & TextEvaluatee.Text & "')"
Label8.Text = (sqlAddCrs)
Try
With cmd
.CommandType = CommandType.Text
.CommandText = sqlAddCrs
.Connection = conn
.ExecuteNonQuery()
End With
Catch ex As Exception
Label6.Text = ex.Message
Exit Sub
End Try
Next
End Sub