Is there a way to obtain a specific membership provider?
When you make calls to the 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"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With