how can i use to show the selected value from data set i think there is a problem of dataset use to take out value from data set
my code is
protected void Page_Load(object sender, EventArgs e)
{
SqlDataAdapter adap = new SqlDataAdapter("SP_selectallbooks", con);
adap.SelectCommand.CommandType = CommandType.StoredProcedure;
//DataSet ds = new DataSet();
adap.Fill(ds);
ListBox1.DataSource = ds;
ListBox1.DataTextField = "Books";
ListBox1.DataValueField = "ID";
ListBox1.DataBind();
SqlDataAdapter adap1 = new SqlDataAdapter("SP_SelectAllStudent", con);
adap1.SelectCommand.CommandType = CommandType.StoredProcedure;
//DataSet ds = new DataSet();
adap1.Fill(ds);
ListBox2.DataSource = ds;
ListBox2.DataTextField = "Firstname";
ListBox2.DataValueField = "ID";
ListBox2.DataBind();
}
protected void Button2_Click(object sender, EventArgs e)
{
}
protected void ListBox2_SelectedIndexChanged(object sender, EventArgs e)
{
}
}