<asp:DataGrid id='DataGrid1' runat='server'></asp:DataGrid>
VB.NET
Dim strArray As String() = {'Tom', 'Jerry', 'Harry', 'Mickey'}
DataGrid1.DataSource = strArray
DataGrid1.DataBind()
C#
string[] strArray = {'Tom','Jerry', 'Harry', 'Mickey'};
DataGrid1.DataSource = strArray;
DataGrid1.DataBind();
Share with