472,119 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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

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
0 2406

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Luke Dalessandro | last post: by
reply views Thread by a | last post: by
3 posts views Thread by Rich Armstrong | last post: by
9 posts views Thread by Eric Falsken | last post: by
9 posts views Thread by Kirk | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.