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

1<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Room.aspx.cs" Inherits="NChat.Web.Room" %> 2
3
<%@ Register Assembly="NChat.Controls" Namespace="NChat.Controls" TagPrefix="cc1" %> 4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 5
<html xmlns="http://www.w3.org/1999/xhtml"> 6
<head runat="server"> 7
<title>NChat试用间</title> 8
</head> 9
<body> 10
<form id="form1" runat="server"> 11
<div> 12
<asp:ScriptManager ID="ScriptManager1" runat="server"> 13
</asp:ScriptManager> 14
<table border="0" cellpadding="0" cellspacing ="0" width="100%" height="100%"> 15
<tr> 16
<td style="width:80%"> 17
<asp:UpdatePanel ID="Msg" RenderMode="Inline" UpdateMode="Conditional" runat="server"> 18
<ContentTemplate> 19
<cc1:Panel ID="MsgText" runat="server" BorderStyle="Dotted" BorderWidth="1px" Height="400px" Width="100%" 20
ScrollBars="Vertical"> 21
</cc1:Panel> 22
<br /> 23
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick"> 24
</asp:Timer> 25
</ContentTemplate> 26
<Triggers> 27
<asp:AsyncPostBackTrigger EventName="Tick" ControlID="Timer1" /> 28
</Triggers> 29
</asp:UpdatePanel> 30
<asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional" runat="server"> 31
<ContentTemplate> 32
<asp:TextBox ID="TextBox1" runat="server" Width="522px"></asp:TextBox> 33
<asp:Button ID="Button1" runat="server" Text="发送" OnClick="Button1_Click" /> 34
</ContentTemplate> 35
</asp:UpdatePanel> 36
</td style="width:20%"> 37
<td style="vertical-align: top"> 38
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server"> 39
<ContentTemplate> 40
<asp:CheckBoxList ID="UserList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="UserList_SelectedIndexChanged"> 41
</asp:CheckBoxList> 42
<asp:Timer ID="Timer2" runat="server" Interval="30000" OnTick="Timer2_Tick"> 43
</asp:Timer> 44
</ContentTemplate> 45
</asp:UpdatePanel> 46
</td> 47
</tr> 48
</table> 49
</div> 50
</form> 51
</body> 52
</html> 53



