I'm using one application but have multiple providers in my web.config for memberships, roles and profiles to allow my application to be used by different groups of users who need to connect to different databases.
This means I'm having to change the membership, role and profile providers on-the-fly in my code-behind files. So far I've taken care of the membership and roles a bit like this:
Dim RolePV As RoleProvider = Roles.Providers(GetSettingFromFile("Provider"))
However, I'm having trouble finding out how to do the same sort of thing for Profiles. I've looked at ProfileProvider and ProfileManager but I can't work it out how to access my the profile property that I've created in my web.config file called "ScreenSize". Normally you would just write Profile.ScreenSize to read or write to the property.
Please can you help me to understand how I access the profile property called ScreenSize by dynamically setting the profile provider first?
I'd be very grateful for any help or advice.
View Complete Post