protected void ConstructProductDll()
{
this.ddlProductID.Items.Clear();
ArrayList ArrListProductID = new ArrayList();
string ProductList = this.lblProductIDList.Text;
string[] produSplit = ProductList.Split(';');
ProductList = string.Empty;
int flag = 1; //
foreach (string produ_pair in produSplit)
{
string[] produ_ele = produ_pair.Split(',');
foreach (string s in ArrListProductID)
{
if (s == produ_ele[0])
{
flag=0;
}
}
if (flag == 1 && produ_ele[0]!="")
{
ArrListProductID.Add(produ_ele[0]);
this.ddlProductID.Items.Add(produ_ele[2]);
}
else
{
flag = 1;
}
}
}
dropdownlist 的动态生成
最新推荐文章于 2019-08-30 09:46:00 发布