Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以更改用户为 SQL 成员资格提供商创建帐户的方式,以便用户必须使用他们的电子邮件作为用户名进行注册?我知道默认情况下用户可以将他们的用户名设为电子邮件格式,但它仍然会在用户名的顶部两次询问电子邮件地址,这使得它有点多余。
只是不要UserName在注册时询问用户。询问电子邮件地址并通过电子邮件地址代替UserNameinCreateUser()方法。
UserName
CreateUser()
Membership.CreateUser(PASSEMAILIDHERE, model.Password, model.Email, null, null, true, null, out createStatus);