You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
601 B

2 weeks ago
<%@ Application Language="C#" %>
<%@ Import Namespace = "System.Data.SqlClient"%>
<script runat="server">
void Application_Start(object sender, EventArgs e)
{
Application["total"] = null;
// 在应用程序启动时运行的代码
SqlConnection conn = DB.getConnection();
SqlCommand cmd = new SqlCommand("select userNum from adminInfo",conn);
conn.Open();
Application["total"] = Convert.ToInt32(cmd.ExecuteScalar()); //总访问人数
Application["UserOnLine"] = 0; //当前在线人数
conn.Close();