写入文本
StreamWriter sw = File.CreateText(Server.MapPath("User.txt"));
sw.WriteLine(txtName.Text.Trim().ToString());
sw.WriteLine(txtPassword.Text.Trim().ToString());
sw.Close();
从文本读取
StreamReader sr = File.OpenText(Server.MapPath("User.txt"));
Username = sr.ReadLine();
Password = sr.ReadLine();
sr.Close();
加1的问题 自己解决