the following is the code which i write
ArrayList al = new ArrayList();
al.Add(new UserAccount("0122", "Emo", "online", "false"));
dg1.DataSource = al;
dg1.DataBind();
Hi
I dont know abt User Account in this context
I think the problem is there
My code is take as example
SqlConnection conn = new SqlConnection(_connection);
conn.Open();
ArrayList al = new ArrayList();
SqlDataAdapter da = new SqlDataAdapter("DynamicSearch_Keywords", conn);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.Add("@Search_Keyword", "a");
DataSet ds = new DataSet();
da.Fill(ds);
foreach (DataRow dr in ds.Tables[0].Rows)
foreach (DataColumn dc in ds.Tables[0].Columns)
{
al.Add(dr[dc].ToString());
}
GridView1.DataSource=al;
GridView1.DataBind();
i tried also this
ArrayList al1 = new ArrayList();
al1.Add("0122");
al1.Add("01234");
al1.Add("012345");
GridView1.DataSource=al1;
GridView1.DataBind();
All r working