web.config
登陆按钮:
protected void Button1_Click(object sender, EventArgs e)
{
bool result = FormsAuthentication.Authenticate(TextBox1.Text, TextBox2.Text);
if (result)
FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, true);
}