Hi
I have a asp.net web form in which I display registered customers in a Dropdown. In the Dropdown I can choose one customer,
and click a "Show data"-button. That should display all registered data about the chosen customer in Gridview.but i didn't
get the result.plz help me.my code is below
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack )
{
Bind ();
}
}
public void Bind()
{
OrdersBl obj = new OrdersBl();
DataSet ds = new DataSet();
ds = obj.GetorderDetails();
DropDownList1.DataSource = ds.Tables[0];
DropDownList1.DataTextField = "ShippingId";
DropDownList1 .DataBind ();
}
protected void GridShow_click(object sender, EventArgs e)
{
datashow();
}
public void datashow()
{
OrdersBl obj = new OrdersBl();
DataSet ds = new DataSet();
ds = obj.onerecord();
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
OrdersBl obj = new OrdersBl();
DataSet ds = new DataSet();
//string s;
//s = DropDownList1.Text.ToString();
ds = obj.onerecord();
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}