1.首先双击Login控件,在自动生成的Login1_Authenticate(object sender, AuthenticateEventArgs e)方法里面写如下内容:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
//这里调用的是你自己写的验证用户 的方法
bool tg = newDataTask().validationUser(Login1.UserName, Login1.Password);
验证之后通过返回的方法是True还是对False对 e.Authenticated 赋值, 如果被赋值为true就通过验证,跳转到Login1控件的属性DestinationPageUrl所绑定的URL
e.Authenticated = tg;
}