http://www.tracefact.net/Article/FormsAuthentication.aspx
读了里面的文章,写的很好!但是我在实际练习的时候却出现了问题
App_Code里面的那个UserTableAdapters.cs类好像不是平常的类!
不知道怎么来的!而且我写的时候namespace AuthDataSetTableAdapters { // 检查是否是正确的用户名,如果是正确的用户名,带回正确的密码
public partial class UserTableAdapter {
public bool IsValidUserST(string userName, out string password) {
password = "";
return Convert.ToBoolean(this.IsValidUser(userName, ref password));
}
}
}
老是提示this.IsValidUser(userName, ref password)找不到该方法!!为啥啊!
读了里面的文章,写的很好!但是我在实际练习的时候却出现了问题
App_Code里面的那个UserTableAdapters.cs类好像不是平常的类!
不知道怎么来的!而且我写的时候namespace AuthDataSetTableAdapters { // 检查是否是正确的用户名,如果是正确的用户名,带回正确的密码
public partial class UserTableAdapter {
public bool IsValidUserST(string userName, out string password) {
password = "";
return Convert.ToBoolean(this.IsValidUser(userName, ref password));
}
}
}
老是提示this.IsValidUser(userName, ref password)找不到该方法!!为啥啊!
看一下这篇文章
--------------------------------------------------------------
SELECT Id, Name, Password, UserImage, RegisterDate, Email, Homepage, PostCount,
ReplyCount, [Level]
FROM [User]
WHERE (Name = @name)
IsValidUser(@userName,@password)
--------------------------------------------------------------
右键“add query”--Choose a command type--use existing stored produre--选择IsValidUser就ok了。