- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
public partial class Chat : System.Web.UI.Page
{
...
private List<string> Messages
{
get { return (List<string>)Cache["messages"]; }
set { Cache.Insert("messages", value); }
}
protected void btnAddMessage_Click(object sender, EventArgs e)
{
if (this.Messages != null)
{
this.Messages.Add(string.Format("{0} say :{1}\n", this.UserName, tbUserMessage.Text));
// wai... oh shi---
this.Messages = this.Messages;
}
}
}
не, не хочу такой чат.