我正在使用SqlMemberShipProvider,它运行良好,但我希望MembershipUser有一些额外的属性,如FirstName,LastName,Phone Number等。最好的方法是什么?我是否必须创建自定义成员资格提供程序,或者是否有更好的方法向用户添加其他功能?
答案 0 :(得分:7)
有关用户的其他信息正是ProfileProvider的用途。您可以在web.config文件中指定您想要的额外属性和默认提供程序(SqlProfileProvider,如果您要保留当前使用的SQL)将为您处理持久性。
以下是how to build the sample的链接。