chatting.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class chatting : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["username"] == null)
{
Response.Write("<script>alert('没有登录,不能进行该操作');history.go(-1);</script>");
}
else
{
Label3.Text = "欢迎进入聊天室!";
Label2.Text = Session["username"].ToString();
}
if (content.Text != "")
{
Application.Lock();
Application["content"] = Application["content"] + "\n" + Label2.Text + ":" + content.Text + "(" + DateTime.Now.ToString() + ")";
Application.UnLock();
TextBox1.Text = Application["content"].ToString();
content.Text = string.Empty;
}
}
protected void Button2_Click(object sender, EventArgs e)
{
if (content.Text != "")
{
Application.Lock();
Application["content"] = Application["content"] + "\n" + Label2.Text + ":" + content.Text + "(" + DateTime.Now.ToString() + ")";
Application.UnLock();
TextBox1.Text = Application["content"].ToString();
}
content.Text = string.Empty;
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
