By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,475 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

Bind profile custom properties (from web.config) to gridview or formview

P: n/a
It seems that the ASP.NET Microsoft team didn't think about this!!
The profilemanager class has the following methods:
- DeleteInactiveProfiles. Enables you to delete all profiles older than

a specified date.
- DeleteProfile. Enables you to delete a profile associated with a
specified username.
- DeleteProfiles. Enables you to delete a set of profiles.
- FindInactiveProfilesByUserName. Returns a collection of ProfileInfo
objects that represent profiles that have been inactive since a
specified date and match a specified name.
- FindProfilesByUserName. Returns a collection of ProfileInfo objects
that represent profiles that match a specified username.
- GetAllInactiveProfiles. Returns a collection of ProfileInfo objects
that represent profiles that have been inactive since a specified date.

- GetAllProfiles. Returns a collection of ProfileInfo objects that
represent all profiles.
- GetNumberOfInactiveProfiles. Returns an integer that represents the
number of profiles that have been inactive since a specified date.
- GetNumberOfProfiles. Returns an integer that represents the total
number of profiles.
None of these methods return a complete profile, although many of the
methods return a collection of ProfileInfo objects. The ProfileInfo
object represents the following profile properties:
- IsAnonymous. A Boolean value that represents whether or not the
profile is associated with an anonymous or authenticated user.
- LastActivityDate. A date and time that represents the last time the
profile was accessed.
- LastUpdatedDate. A date and time that represents the last time the
profile was updated.
- Size. An integer value that represents the size of the profile as
stored by the profile provider.
- UserName. A string that represents the user associated with the
profile.
I would like to retrieve all the custom properties that I've configure
on the Web.config and none of the available methods allows to do
this!!!
WHY MAKE PROFILES AVAILABLE IF THEN THEY DON'T SUPPLY ANY METHOD TO
RETRIEVE THE CUSTOM PROPERTIES?
I'm trying to do several things:
- get a list of all users with profiles in a gridview or most probably
formview where I can show a few of the properties of the profile
base-class i.e. username, IsAnonymous and also a few of the custom
properties defined within the <profile> section of the web.config file
i.e. acountry, atown, aphotoPath... and then a detailsview of a
selected profile where the full profile is displayed
- search for users that have a profile and that are from country XX and

town yy, etc.. so basically a search based on the properties defined
within the profile section of the web.config, then display the users
with profiles in a gridview/formview where I can show a few of the
properties of the profile base-class i.e. username, IsAnonymous and
also a few of the custom properties defined within the <profile>
section of the web.config file i.e. country, town, photoPath... and
then a detailsview of a selected profile where the full profile is
displayed
Part of web.config below:
<properties>
<group name="Location">
<add name="aCountry"
type="string"/>
<add name="aCounty"
type="string"/>
<add name="aTown"
type="string"/>
</group>
<group name="MoreDetails">
<add name="aGender"
type="string" />
<add name="aAge" type="string"
/>
<add name="aEthnicity"
type="string"/>
<add name="aPhotoPath"
type="string"/>
</group>
</properties>
I hope someone can give me some help on this one.
Giorgio

Jan 9 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.