找传奇、传世资源到传世资源站!

asp.net在线WEB聊天室(基于Application实现)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

from clipboard
using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void btn_Send_Click(object sender, EventArgs e) { int P_int_current = Convert.ToInt32(Application["current"]); Application.Lock(); if (P_int_current == 0 || P_int_current > 20) { P_int_current = 0; Application["chats"] = Session["userName"].ToString() "说:" txt_Message.Text.Trim() "(" DateTime.Now.ToString() ")"; } else { Application["chats"] = Application["chats"].ToString() "," Session["userName"].ToString() "说:" txt_Message.Text.Trim() "(" DateTime.Now.ToString() ")"; } P_int_current = 1; Application["current"] = P_int_current; Application.UnLock(); txt_Message.Text = ""; txt_Message.Focus(); } protected void btn_Quit_Click(object sender, EventArgs e) { Application.Lock(); string P_str_userName = Application["user"].ToString(); Application["user"] = P_str_userName.Replace(Session["userName"].ToString(), ""); Application.UnLock(); Response.Write("<script>window.close();</script>"); }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复