【发布时间】:2013-12-06 08:31:18
【问题描述】:
我有一个 C# 应用程序,我需要该列表来“记住”之前输入的内容。
http://oi40.tinypic.com/2ivhcuw.jpg
因此,一旦添加了与会者,如果添加了新与会者,之前的与会者将保留在列表中。目前它只显示最近的与会者,我希望他们保存,直到我决定清除它们(可能在会话中?)
List<Information> infoList = new List<Information>();
Information data = new Information();
firstName = resultEntry.Properties["givenname"].Value.ToString();
lastName = resultEntry.Properties["sn"].Value.ToString();
fullName = firstName + " " + lastName;
//data.CWID = resultEntry.Properties["username"].Value.ToString();
data.FullName = fullName;
// data.Email = resultEntry.Properties["email"].Value.ToString();
infoList.Add(data);
【问题讨论】:
-
在 asp.net 中工作时,有几种方法可以“记住”一个属性,您可以将它放在会话或隐藏字段中。或者你可以在数据库中记住它,如果不使用,以后删除它
-
您能详细说明一下吗?