<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ajax 聊天室</title>
<link href="./js/chat.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
<h3>
Ajax 聊天室演示</h3>
<div id="Screen">
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="85%">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="31">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" height="31">
<img src="img/bg_left_top.gif" width="11" height="31" /></td>
<td width="160">
<span class="s14 fcolor"><b><i>Ajax 聊天室大厅</i></b></span></td>
<td background="img/bg_back_top.gif">
</td>
<td width="31" height="31">
<img src="img/bg_right_top.gif" width="31" height="31" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" background="img/bg_left_center.gif">
</td>
<td style="vertical-align: top; text-align: left;">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="ChatContent" runat="server" style="height: 365px; vertical-align: top; overflow-y: auto;
text-align: left; margin-left: 10px; width: 97%;">
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick">
</asp:Timer>
<asp:Timer ID="Timer2" runat="server" Interval="5000" OnTick="Timer2_Tick">
</asp:Timer>
<asp:Timer ID="Timer3" runat="server" Interval="300000" OnTick="Timer3_Tick">
</asp:Timer>
</td>
<td width="5" background="img/bg_right_center.gif">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="31">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3" height="31">
<img src="img/line_left_point.gif" width="3" height="31" /></td>
<td background="img/line_back_point.gif">
</td>
<td width="5" height="31">
<img src="img/line_right_point.gif" width="5" height="31" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="28%">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="31">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" height="31">
<img src="img/bg_left_top.gif" width="11" height="31" /></td>
<td width="60">
<span class="s14 fcolor"><b><i>在线 </i></b></span>
</td>
<td background="img/bg_back_top.gif">
</td>
<td width="31" height="31">
<img src="img/bg_right_top.gif" width="31" height="31" /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1" background="img/bg_left_center.gif">
</td>
<td height="360" valign="top">
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="UserList" align="left" runat="server" style="width: 97%; overflow-y: auto;
height: 350px">
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer2" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</td>
<td width="5" background="img/bg_right_center.gif">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="31">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="3" height="31">
<img src="img/line_left_point.gif" width="3" height="31" /></td>
<td background="img/line_back_point.gif">
</td>
<td width="5" height="31">
<img src="img/line_right_point.gif" width="5" height="31" /></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25" align="left">
<span class="fcolor">我 对:
<input name="mtowho" type="text" runat="server" class="fcolor" id="mtowho" value="所有人"
size="10" readonly="readonly" />
<select name="mfont" id="mfont" runat="server" class="fcolor">
<option value="0" selected="selected">一般</option>
<option value="1">粗体</option>
<option value="2">斜体</option>
</select>
<select name="mfcolor" id="mfcolor" runat="server" size="1" class="fcolor" style="width: 60px;">
<option value="#FFFFFF" style="background-color: #FFFFFF"></option>
<option value="#000000" style="background-color: #000000" selected="selected"></option>
<option value="#CCCCCC" style="background-color: #CCCCCC"></option>
</select>
<select name="elist" id="elist" runat="server" class="fcolor">
<option value="" selected="selected">不用表情</option>
<option value="14.gif">微笑</option>
<option value="52.gif">蛋糕</option>
</select>
</span>
</td>
</tr>
<tr>
<td height="25" align="left">
<span class="fcolor">要说的话: </span>
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<input id="UserInputTextBox" type="text" size="75" maxlength="90" onkeyup="if(event.keyCode == 13) Button2.click();"
runat="server" />
<asp:Button ID="Button2" runat="server" CssClass="button" Text="发 送" OnClick="Button2_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
正文
.net_Ajax聊天室项目系列解读(Defalut.aspx)2008-10-31 17:29:00
【评论】 【打印】 【字体:大 中 小】 本文链接:http://blog.pfan.cn/yzrj/39181.html
阅读(2033) | 评论(0)
版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!
评论