Private Sub myGridView_RowDataBound(sender As Object, e As GridViewRowEventArgs)
'*** lblGender ***'
Dim lblGender As Label = CType(e.Row.FindControl("lblGender"),Label)
IF Not IsNothing(lblGender) Then
IF e.Row.DataItem("Gender") = "M" Then
lblGender.Text = "Man"
Else
lblGender.Text = "Women"
End IF
End IF
End Sub
SELECT CustomerID, Name,
CASE CountryCode
WHEN 'TH' THEN 'Thailand'
WHEN 'EN' THEN 'English'
WHEN 'US' THEN 'United states'
ELSE 'Unknown'
END AS Country
FROM customer