📄 default.aspx.cs
字号:
/*
* 对在asp.net2.0下利用ajax实现无刷新网页聊天技术原理的探索
* 作者:Gary
* 本小聊天室纯属自娱自乐
* 仅仅是完成了聊天室的基本原理的探索
* 没有注重资源的调解和功能的完善
* http://edidu.cnblogs.com
* 技术支持:asp.net2.0 + Ajax
* 关键字:asp.net2.0 ajax timer updatepanel application session
-*/
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "")
return;
else
Session["Name"] = TextBox1.Text;
if (Application["TalkContent"] == null)
Application["TalkContent"] = "欢迎"+ Session["Name"]+"的到来!<br>";
else
Application["TalkContent"] += "欢迎" + Session["Name"] + "进来了!<br>";
Page.Response.Redirect("~/Talk.aspx");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -