问题请看:http://community.csdn.net/Expert/topic/3915/3915386.xml?temp=.8141138
解决方案 »
- 关于OnClick和OnClientClick问题
- 50分!类的问题!请高手进来看看解决就给分!顶者有分不够加分!
- 为什么我添加新记录后跳转后看不到新记录~ACCESS数据库
- 使用freetextbox遇到不能获得焦点,无法取出text值(js)的问题.
- Exception Details: System.Data.OleDb.OleDbException: FROM 子句语法错误。
- asp.net编程,如何实现Excel中的强制换页控制?
- 下载了.net多用户留言本,可是为何里面还分程序文件和源码?
- 我把RadioButtonList控件的EnableViewState属性设为False后,怎么在返回时还是保留了它们的值的?怎么回事?应该怎样禁掉?
- 关于对客户端文件进行压缩的问题,发言有分!!
- 单页面开发,同时加载一个片段html(内含js模块),js该如何区分?
- asp.net button的问题,大家看看!
- datagrid导出excel新问题
现已作了尝试,代码如下:// Content.aspx.cs ///////////////////////////////////////////////////////
public class Content : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
Session.Timeout = 60;
Response.Write("欢迎 . . .<br>\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 + "<br>\n");
Response.Flush();
}
else
{
Application.Remove(name);
}
}
}
} 可以聊天,但发现一大问题:同时连接的用户被限制在50个左右,再多的就连不上了,并且会导致其他用户也陷于停滞状态。
请高手答疑解惑,还可另开贴给分!