if (e.CommandName == "addtocart")
{
int idx = e.Item.ItemIndex;
int ItemID = Convert.ToInt32(DLProductsDetails.DataKeys[idx]);
}
}
I got an error in those red world say that the name do not exit want my datalist is that name
Erorr in code
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Riyaz AkhtarRank #2,275 · 619 reputationPosted Jul 22, 2013, 4:52 AM EDT
protected global::System.Web.UI.WebControls.DataList DLProductsDetails;
Tan Kai Kai114 reputationPosted Jul 22, 2013, 4:56 AM EDT
Riyaz AkhtarRank #2,275 · 619 reputationPosted Jul 22, 2013, 4:59 AM EDT
Tan Kai Kai114 reputationPosted Jul 22, 2013, 5:01 AM EDT