https://www.yljianzhan.com/安装了个聊天小程序,用visual studio 2017测试运行后,显示错误:
未将对象引用设置到对象的实例。
本人初学,什么语法也不懂!! 谁要这些小网站程序块,联系我!qq:466074134
原主页聊天代码:(https://yljianzhan.com,
using System;
using System.Data;
using System.Configuration;
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;
using System.Web.SessionState;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSend_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() + "说:" + txtMessage.Text.Trim() + "(" + DateTime