using System; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string[] Erec = new string[2]; Erec[0] = "ASD"; Erec[1] = "FGH"; Erec[2] = "JKL"; Erec[3] = "QWE"; foreach(string str in Erec) Console.WriteLine(str); Console.ReadLine(); } } }
http://www.dotnetfunda.com/codes/code3294-how-to-bind-array-object-to-gridview.aspx
Mark as Answer if its helpful to you Kumaraspcode2009@gmail.com
Thanks & Regards Hari
client side <asp:GridView ID="rd1" runat="server" > </asp:GridView> Server Side ArrayList arr = new ArrayList(); arr.Add("Jesus"); arr.Add("Jehovah Jireh"); arr.Add("Jehovah Ruffa"); rd1.DataSource = arr; rd1.DataBind();
Login to post response