那位能给我说说form验证呀。不是很懂。

解决方案 »

  1.   

    <a href = "http://www.cnblogs.com/csjackie/archive/2008/11/03/1325760.html?login=1" ></a>
      

  2.   

    <a href = "进去看吧" >http://www.cnblogs.com/csjackie/archive/2008/11/03/1325760.html?login=1</a>
      

  3.   

    就是Form提交数据。然后判断啊。
      

  4.   

    Form验证是什么挖?   我只会JS 验证   然后传到后台  在后台在验证一次````````求理论帝``````
      

  5.   


    晕。。ASP.NET Forms 身份验证----少了个s1. 在 web.config 中设置 Forms 身份验证相关参数。
    2. 创建登录页。登录页中的操作包括:1. 验证用户名和密码是否正确。
    2. 创建身份验证票证对象。
    3. 将身份验证票证对象加密成字符串,写入 Cookies。
    4. 重定向到原始请求 URL。
    <?xml version="1.0"?>
    <configuration>
        <system.web>
            <compilation debug="true"/>
            <authentication mode="Forms">
                <forms loginUrl="~/logon.aspx" name="MyAuthForm">
                    <credentials passwordFormat="Clear">
                        <user name="username" password="password"/>
                    </credentials>
                </forms>
            </authentication>
            <authorization>
                <deny users="?"/>
            </authorization>
        </system.web>
    </configuration>
    <%@ Page Language="C#" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server">
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (FormsAuthentication.Authenticate(this.txtUsername.Text, this.txtPassword.Text))
                FormsAuthentication.RedirectFromLoginPage(this.txtUsername.Text, true);
            else
                Response.Write("用户名或密码错误!");
        }
    </script><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>登录页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            Username: <asp:TextBox ID="txtUsername" runat="server" Width="100px" Text="username"></asp:TextBox><br />
            Password: <asp:TextBox ID="txtPassword" runat="server" Width="100px" Text="password"></asp:TextBox><br />
            <asp:Button ID="Button1" runat="server" Text="Sign In" OnClick="Button1_Click" />
        </div>
        </form>
    </body>
    </html>这个就是简单的例子。更详细信息,请参考 MSDN 文档。
    ms-help://MS.MSDNQTR.v80.chs/MS.MSDN.v80/MS.NETDEVFX.v20.chs/dv_ASPNETgenref/html/8163b8b5-ea6c-46c8-b5a9-c4c3de31c0b3.htm
      

  6.   

    FORM认证