0
A
回答
2
这是(简而言之)你将如何实现默认配置文件提供程序。
在你的web.config中,添加
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ApplicationServices"
<!--same connection string as the membership provider-->
applicationName="/"/>
</providers>
<properties>
<add name="FirstName" type="string"/>
<add name="LastName" type="string"/>
<!--...or whatever profile properties you want/need-->
</properties>
</profile>
然后你就可以将值分配给该配置文件属性
ProfileBase profile = ProfileBase.Create(userName);
profile["FirstName"] = "John";
profile["LastName"] = "Smith";
还要读值
string firstName;
string lastName;
ProfileBase profile = ProfileBase.Create(userName);
firstName = profile["FirstName"] as string,
lastName = profile["LastName"] as string,
+0
谢谢!实际上,我一直在寻找的是ProfileBase.Create(name):)无论如何,这个问题完全描述了这个话题,所以它对其他用户 – 2013-02-15 09:35:14
相关问题
- 1. 通过ASP.NET Membership.OpenAuth获取用户个人资料信息
- 2. 如何在rails中获取linkedin个人资料信息?
- 3. 如何从ASP.NET MVC获取完整的Facebook个人资料
- 4. 如何从google + login android获取个人资料信息?
- 5. 如何从Facebook API获取用户个人资料信息Android
- 6. 如何获取Instagram个人资料信息?
- 7. 从“我的个人资料”中获取信息
- 8. 如何获取LinkedIn个人资料信息,然后默认信息Android
- 9. Chrome身份识别API以获取个人资料信息
- 10. 通过Android应用程序在Google +上获取个人资料信息
- 11. 如何在azure广告中获取用户个人资料详细信息b2c
- 12. 如何使用LinkedIn API获取某人的个人资料信息
- 13. Facebook API:获取用户个人资料的详细信息
- 14. Facebook获取用户的个人资料信息
- 15. 使用Angular2获取用户Auth个人资料信息Firebase
- 16. 从Android LinkedIn SDK获取个人资料信息
- 17. 通过3个表获取信息
- 18. 使用JavaScript API从LinkedIn获取个人资料详细信息
- 19. 如何从android应用程序中的twitter获取个人资料信息?
- 20. 如何在Django中获取用户的Google个人资料信息?
- 21. 成功登录Facebook后需要获取个人资料信息
- 22. Google SingIn in Swift获取个人资料信息
- 23. Facebook API,无法获取名字和个人资料信息
- 24. PHP注册个人资料信息
- 25. 如何使用身份提供商和asp.net MVC获取linkedin个人资料信息5
- 26. Outlook Office 365 - 获取完整个人资料详细信息
- 27. 如何在android中集成google plus并获取个人资料信息?
- 28. ASP.NET MVC查看个人资料
- 29. Google+ API检索个人资料信息
- 30. 如何在iPhone SDK中访问我的个人资料信息?
这个Q是太模糊了。什么样的会员供应商?什么样的数据库访问策略? – 2013-02-14 19:57:42
@Dave一个asp.net mvc buit-in成员资格提供者,并且我想访问Users表,如果有可能的话 – 2013-02-14 20:00:23
,它的关系型数据库。我最喜欢的方式是创建我想要的数据视图并将其导入到我的edmx文件。使用电子邮件作为关键。 – 2013-02-14 20:01:41