110,535
社区成员
发帖
与我相关
我的任务
分享
public ArrayList arl = new ArrayList(); //我在这里定义了一个全局数组
public void Fill(ArrayList sdf)
{
ArrayList ar = sdf;
Model.stock stockInfo = null;
for (int i = 0; i < ar.Count; i++)
{
stockInfo = Bll.Stock.GetStockByUUID(ar[i].ToString());
HtmlTextArea ht = new HtmlTextArea();
ht.ID =stockInfo.uuid;
arl.Add(ht.ID); //把我需要的内容添加进去
ht.InnerText = stockInfo.remark;
Panel1.Controls.Add(ht);
}
}
public void Button()
{
Model.stock stockInfo = null;
for (int i = 0; i < arl.Count; i++) //在这里我去得不到他的值?显示的是为空
{
stockInfo = Bll.Stock.GetStockByUUID(arl[i].ToString());
string uuuid = stockInfo.uuid;
string vremark = stockInfo.remark;
this.Page.GetType().InvokeMember("ReadUCMessage", BindingFlags.InvokeMethod, null, this.Page, new object[] { uuuid, vremark});
}
}