I am trying to populate a datalist control onchange of a dropdown list. I am unable to fire Itemcommand event of datalist. When I populate datalist on page_load event it works fine. but I don't know what is happening with the dropdown.
code behind:
protected void dlSize_SelectedIndexChanged(object sender, EventArgs e)
{
string CategoryID = Request.QueryString["ID"].ToString();
using (TestEntities db = new TestEntities())
{
IEnumerable<Test.Product> Test= //linq expression here
dlProducts.DataSource = Test;
dlProducts.DataBind();
}
}