Hi Qin Dian Tang,
Thanks.
I tried that,but there is one problem.
The listbox is retrieving back the phone no.s of only the 1st recored in every pages.
i mean the data are changing in every pages except in the listbox.
i made following changes:-
protected void DetailsView1_DataBound(object sender, EventArgs e)
{
DetailsView1.Fields[0].ShowHeader = false;
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["NorthwindConnectionString2"]);
string str = "select phone from Table1";
SqlCommand cmd = new SqlCommand(str, conn);
conn.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
ListBox ListBox1 = (ListBox)DetailsView1.FindControl("ListBox1");
string[] lst1 = ds.Tables[0].Rows[0][0].ToString().Split(',');
for (int i = 0; i < lst1.Length; i++)
ListBox1.Items.Add(lst1[i].ToString());
conn.Close();
}
protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
{
DetailsView1.PageIndex = e.NewPageIndex;
this.SetData();
}
any further help ?
thanks.
jack.