473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 2537

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luke Dalessandro | last post by:
I am trying to develop a quick Shopping cart for ASP.NET 2.0. I have added a CartItems table to the AspNetDB access database, that contaings CartItems keyed off of the aspney_Users.UserId key (the...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
0
by: a | last post by:
Q. Unable to get a Profile custom (object) collection to bind to GridView,etc (IList objects)? This is my first custom object so I may be doing something rather simple, wrong, or it may be...
0
by: a | last post by:
I need to create an instance of a custom object 'School.Teacher' and use it in a Profile object. I'm developing a bad case of "Pretzel Logic" thinking about this. Filling the custom object ...
3
by: Rich Armstrong | last post by:
I've implemented a custom profile provider following the pattern and examples provided with ASP.NET 2.0, but no Profile object ever appears in my page; that is, after executing the following, ...
2
by: Peter Afonin | last post by:
Hello, I'm using CreateUserWizard control in ASP.NET 2.0. I'm storing the data in SQL Server 2005. The first and last steps run smoothly without any problems. But I added one middle step to...
9
by: Eric Falsken | last post by:
I've added a number of additional properties to my profile. Sometimes, the values are populated when the user is retrieved from the database, but sometimes the values are empty/default. How can I...
9
by: Kirk | last post by:
I have successfully, implemented a custom Membership Provider to a SQL 2000 table, however, I am having problems doing the same with a Profile Provider. As I understand it, the steps for both of...
1
by: Jeff | last post by:
hi asp.net 2.0 I have a webpage with a gridview. Each row in the GridView contain info about a user (Membershipuser, standard asp.net 2.0 membership). One of the columns in the GridView is a...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.