473,581 Members | 2,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:
- DeleteInactiveP rofiles. 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.
- FindInactivePro filesByUserName . Returns a collection of ProfileInfo
objects that represent profiles that have been inactive since a
specified date and match a specified name.
- FindProfilesByU serName. Returns a collection of ProfileInfo objects
that represent profiles that match a specified username.
- GetAllInactiveP rofiles. 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.
- GetNumberOfInac tiveProfiles. Returns an integer that represents the
number of profiles that have been inactive since a specified date.
- GetNumberOfProf iles. 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.
- LastActivityDat e. 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="MoreDetai ls">
<add name="aGender"
type="string" />
<add name="aAge" type="string"
/>
<add name="aEthnicit y"
type="string"/>
<add name="aPhotoPat h"
type="string"/>
</group>
</properties>
I hope someone can give me some help on this one.
Giorgio

Jan 9 '06 #1
0 2555

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

Similar topics

2
4944
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 automatically generated primary key for the table). I want to bind the current user's CartItems to a GridView, which should be really easy. The...
6
2215
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 class would have CurrentUser property that would hold customer class in session and that was fine for all my situations. Now ASP.NET 2.0 came...
0
1946
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 something else to do with the Profile object. Either way, I need help Here's a brief description of the...
0
1828
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 'School.Teacher' as an ArrayList creates the proper information (see aspx code below), but I'm unable to use this ArrayList in the Profile object....
3
1908
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, ProfileCommon profile = this.Profile; in my Page_Load method, profile is always null. My web.config file contains the following section:
2
6344
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 collect some other information from the user. I've added this to Web.config: <profile>
9
3095
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 make sure that the values are always populated correctly? Further example, my website is working reliably enough, but I'm trying to access the...
9
3266
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 these are similar: Create a new class (MyMembershipProvider and MyProfileProvider). Add the "Inherits..." value to the provider...
1
1887
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 BoundField containing username. I don't know if I can access that boundfield from the method below or use some other tricks to get the username.
0
7808
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8312
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7914
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6564
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5683
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1145
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.