EMROOM EMROOM为你带来创造E世界明天的资本 设为首页
加入收藏
站长信箱
首页网络编程ASP代码下载网页设计服 务 器网络安全数 据 库SEO探索业界动态IT数码IT报价网站地图
当前位置:EMROOM--如何使用ASP.NET开发基于推技术的聊天室?
如何使用ASP.NET开发基于推技术的聊天室?
〖双击滚屏,单击停止〗〖放大字体〗〖缩小字体
public class Content : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
Session.Timeout = 60;
Response.Write("欢迎 . . .
\n");
Response.Flush();
Application[Session.SessionID] = Response;
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
}
}


// Send.aspx.cs //////////////////////////////////////////////////////////
public class Send : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button ButtonSend;
protected System.Web.UI.WebControls.TextBox TextBox1;

private void ButtonSend_Click(object sender, System.EventArgs e)
{
foreach(string name in Application.AllKeys)
{
HttpResponse Response = Application[name] as HttpResponse;
if(Response!=null && Response.IsClientConnected)
{
Response.Write(TextBox1.Text + "
\n");
Response.Flush();
}
else
{
Application.Remove(name);
}
}
}
}
放大字体〗〖缩小字体〗 〖关闭窗口 来源:web,发布于:EMROOM ,已被阅读:
搜索更多相关:
GOOGLE:如何使用ASP.NET开发基于推技术的聊天室?
BAIDU:如何使用ASP.NET开发基于推技术的聊天室?
文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。
如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
编辑EMAIL:emroom@126.com,谢谢!