1.Arraylist中每项是数组的操作方法
public
ArrayList ImgList
{ get { ArrayList arrImgList = new ArrayList(); for(int i = 0; i<lb_ImageList.Items.Count; i++) { string [] strImgItem = new string[2]; ListItem LI = this.lb_ImageList.Items[i]; strImgItem[0] =LI.Text; strImgItem[1]=LI.Value; arrImgList.Add(strImgItem); } return arrImgList; } set { lb_ImageList.Items.Clear(); ArrayList arrImgList = (ArrayList)value; for(int i = 0;i<arrImgList.Count;i++) { string strFileName = ((string[])arrImgList[i]).GetValue(0).ToString(); string strAttchmentID = ((string[])arrImgList[i]).GetValue(1).ToString(); ListItem LI = new ListItem(strFileName,strAttchmentID); lb_ImageList.Items.Add(LI); } } }
2.清除页面级缓存
Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
转载于:https://www.cnblogs.com/Elong/archive/2005/09/09/232986.html
转载请注明原文地址: https://mac.8miu.com/read-79348.html