ArrayList lst = tblGameType.tblGameTypeList(strWhere, 1, 1000, out rCount);
tblGameTypeTable info = new tblGameTypeTable();
foreach (object obj in lst)
{
tblGameTypeTable info = (tblGameTypeTable)obj;
Label lbl = new Label();
lbl.ID = info.ID.ToString();
lbl.Text = "<a href=# οnclick=BindDataList('" + info.ID + "')>" + info.typeName + "</A> | ";
或者用:
Label1.Text += "<a href=# οnclick=javascript:bind(" + info.ID + ");return false;>" + info.typeName + "</a> | ";
Controls.Add(lbl);
}