add an ItemCommand handler for the DataList, then tryvoid DataList_ItemCommand(Object sender, DataListCommandEventArgs e)
{
int quantity =((DropDownList)e.Item.FindControl("QuantityDropDownList")).SelectedIndex+1;
}
{
int quantity =((DropDownList)e.Item.FindControl("QuantityDropDownList")).SelectedIndex+1;
}
int quantity =((DropDownList)ProductDataList.SelectedItem.FindControl("QuantityDropDownList")).SelectedIndex+1;
因为我是使Button触发事件,
如果给Datalist加了这个事件则根本不会触发啊 To jjcccc()
试过了,但由于是Button触发事件 SelectedItem根本好像就没有
谢谢大家了:)