using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class m3 : System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e);
protected void btnSubmit_Click (object sender, EventArgs e)
{
if (this.txtLoginId.Text.Trim().Length == 0)
{
this.lblMessage.Text = "请输入有户名!";
return;
}
if (this.txtLoginId.Text.Trim().Length == 0)
{
this.lblMessage.Text = "请输入密码!";
return;
}
if (this.txtLoginId.Text.Trim() == "abc" &&
this.txtLoginId.Text.Trim() == "123")
{
mm. User user = new mm.User();
user.Username = txtLoginId.Text;
user.passWord = txtLoginId.Text;
Session["User"] = user;
Response.Cookies["LoginTime"].Value = DateTime.Now.ToString();
Response.Redirect("Welcome.aspx");
}
else
{
this.lblMessage.Text = "用户名/密码错误!";
}
}
}
错误 1 “m3.Page_Load(object, System.EventArgs)”必须声明主体,因为它未标记为 abstract、extern 或 partial