473,728 Members | 1,711 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 2568

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

Similar topics

2
4957
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 problem is that I need the UserID as a parameter for my AccessDataSource. The parameters that can be...
6
2226
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 and we have Profile property for pages that could be extended with configuration to have custom...
0
1954
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 code----------------------------------------------------------------------------------
0
1836
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. The aspx code below shows the attempt and error message.
3
1913
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
6356
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
3106
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 user profiles from an offline application, and very few of the custom properties are being returned to...
9
3270
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 (MembershipProvider and ProfileProvider). Modify the web.config file to assign this class and it's connection...
1
1893
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
8894
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9411
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9265
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9188
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9122
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8113
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4787
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2159
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.