温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:NChat简易聊天室源码(.Net 3.5,LINQ,AJAX)
当前文件路径:NChat/NChat.Controls/Panel.cs

1using System; 2
using System.Collections.Generic; 3
using System.Linq; 4
using System.Text; 5
using Web = System.Web.UI.WebControls; 6
using System.Web.UI.WebControls; 7
8
namespace NChat.Controls 9
{ 10
public class Panel : Web::Panel 11
{ 12
private string text; 13
public string Text 14
{ 15
get 16
{ 17
if (ViewState["Text"] != null) 18
text = ViewState["Text"].ToString(); 19
return text; 20
} 21
set 22
{ 23
ViewState.Add("Text", value); 24
} 25
} 26
27
protected override void OnInit(EventArgs e) 28
{ 29
base.OnInit(e); 30
} 31
32
protected override void RenderContents(System.Web.UI.HtmlTextWriter writer) 33
{ 34
writer.Write(Text); 35
base.RenderContents(writer); 36
} 37
} 38
} 39





}
}