开发者

Get specific membership provider

Is there a way to obtain a specific membership provider?

When you make calls to th开发者_如何学编程e static Membership methods they query whatever provider you have configured as the defaultProvider. Is it possible to get a reference to a specific provider that is configured in your web.config and query against only that provider?


Yes, if you have multiple providers configured in your web.config, you can look them up by name.

MembershipProvider membershipProvider = Membership.Providers["foo"];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜