请在IIS下加一个虚拟目录,名为QuickStart,映射到你的visual studio目录中的:
D:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\QuickStart打开浏览器 http://localhost/quickstart 
慢慢看吧,想要的问题都有了

解决方案 »

  1.   

    这里有完整的登陆代码:C#做的ASP.NET登陆篇http://www.aspx.cn/article/go.asp?id=266&typeid=2
      

  2.   

    worx 《asp.net 1.0 入门经典——c#编程篇》从667页开始 清华大学出版社翻译 里面有详细的资料。代码太长了点了。说说关键性的思路网页验证通过
      + 根据用户名读取数据库
        +用户名不存在——返回用户名不存在的提示
        +用户名存在
          +验证密码是否相符
            +密码相符合
              | FormsAuthentication.RedirectFromLoginPage(name.Text,false);
              | Response.Redirect("admin_main_page.aspx",true);
            +密码不符合——返回密码错误的提示web.config里面一段配置文件示例。如需保护admin_main_page.aspx页面,那么:
    <configuration>
     <location path="admin_main_page.aspx">
            <system.web>
                <authorization>
                    <deny users="?" />
                </authorization>
            </system.web>
        </location>
    </configuration>
      

  3.   

    简单就是好,没有必要使用其他文件
    在login.aspx中:
    private void UserLogin(object sender, System.EventArgs e)
    {
    SqlCommand sqlCmd=new SqlCommand("select uid,upwd from users where uid='"+
                           textbox1.text+" and upwd='"+
                           textbox2.text+"'",sqlConn);
    SqlDataReader  sqlRead;
    sqlConn.Open();
    sqlRead=sqlCmd.ExecuteReader();
    if(sqlRead.Read()) Session["uID"]=sqlRead.Getstring;
    }
    在其他所有需要先登录才能使用的页面中
    private void Page_Load(object sender, System.EventArgs e)
    {
     if (Session["uID"]==null)
    {
    Response.Redirect("login.aspx");
    return;
    }
    }
    建议不要使用各种配置文件来管理