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);
}
}
}
{
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);