Look at the code:
If
Dim studentid As String = CType(row.FindControl("Label1"), Label).Text
studentid = sid
Then
cmd.CommandText = "update feerpt " & _
" set receved=receved+@receved,balance=@balance" & _
" where studentid= " & sid & ""
probably, what you meant to say was:
Dim studentid As String = CType(row.FindControl("Label1"), Label).Text
If studentid = sid Then
cmd.CommandText = "update feerpt " & _
" set receved=receved+@receved,balance=@balance" & _
" where studentid= " & sid & ""