0
在我的应用程序中,授权用户将注册一个新客户并设置他们的用户名和密码等。客户不会自行注册它们。在创建用户时在asp.net MVC中设置配置文件属性
我在创建新用户的类文件中有以下代码,它工作得很好。
public MembershipCreateStatus CreateUser(string userName, string password, string email, string employeeID)
{
if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
if (String.IsNullOrEmpty(password)) throw new ArgumentException("Value cannot be null or empty.", "password");
if (String.IsNullOrEmpty(email)) throw new ArgumentException("Value cannot be null or empty.", "email");
MembershipCreateStatus status;
/// _membershipProvider.CreateUser("asdas","ds123BB", email, "asdasd", "asdasdad", true, null, out status);
_membershipProvider.CreateUser(userName, password, email, null, null, true, null, out status);
string answer = status.ToString();
return status;
}
但是我还想创建该用户时为该配置文件设置employeeID属性。
如何在创建新用户时设置EmployeeID? 谢谢
我已经创建了一个自定义成员资格提供程序来将数据存储在我的sqlserver中。这部分正在为会员工作。我不确定你提到的是我的问题。 – twal 2010-06-07 14:37:29