以注册登录为例
using System.Text;
1.注册
//注册
public string registered(string username,string password)
{
//判断是否已经有了这个文件
if (!System.IO.File.Exists("c:\\users\\administrator\\desktop\\webapplication1\\webapplication1\\testtxt.txt"))
{
//没有则创建这个文件
FileStream fs1 = new FileStream("c:\\users\\administrator\\desktop\\webapplication1\\webapplication1\\testtxt.txt", FileMode.Create, FileAccess.Write);//创建写入文件
//设置文件属性为隐藏
System.IO.File.SetAttributes(@"c:\\users\\administrator\\desktop\\webapplicat