User Profile Information

I'm trying to figure out a best method for keeping track of certain profile information about a user that has a membership profile (username, password, etc.).  In particular the user is associated with a customerID that I use quite ofter in the querying of data.  Any suggestions on the best way to keep this information handy?  In the past I would keep it part of the session for the user, but now with the provider model and the personalization stuff I thought there might be a better way.

Your comments are appreciated.
2/16/2006 5:50:25 AM 27051 articles. 1 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 49

here is a sample of part of one of my static user classes: The from any age I can call User.userID and get a int returned with the users ID.

(Note: on below. Users session data is added to a sorted list at login. And than added to the session.)


Hope this helps!



public static class User


#region "Session"

public static int userID


get { return Convert.ToInt32(GetSessionData("userID")); }


public static string Username


get { return GetSessionData("Username"); }


public static string Email


get { return GetSessionData("Email"); }


public static string Name


get { return GetSessionData("Name"); }


public static string Unit


get { return GetSessionData("Unit"); }


public static string Location


get { return GetSessionData("Location"); }


public static string Ext


get { return GetSessionData("Ext"); }


public static string Role


get { return GetSessionData("Role"); }



public static string GetSessionData(string Key)


SortedList SessionData = (SortedList)HttpContext.Current.Session["SessionData"];



return SessionData.GetByIndex(SessionData.IndexOfKey(Key)).ToString();


catch (Exception ex)


James Hearst
.NET Application Developer
2/16/2006 7:09:06 AM

Similar Artilces:

Modify User Information / User Profile
I have been rooting around looking for the answer... with no luck... I want to modify the User Information / User Profile collected, for example delete MSN, AIM and Yahoo and add City, State and Zip. Where is this? Is it right in front of my nose? Thanks in advance, (again). The table in the DB is the Community_Users table. You will have to either extend this table, or create a new table using a foreign key relationship to the users table to hold your new fields. You probably don't need to mod any stored proc though since the profile procedures use select * (bad design, but ...

How to store user profile information during create user?
Hi, I'm just try to store user information during create user via CreateUserWizard that add Textbox, DropDownList and RadoButtonList. How to store data form control to UserProfile (via CreateUserWizard) ? Note. I set DisableCreatedUser = true because want to proof user befor activate. (Begining V2.0, VB, VWD 2005 Express Edition) Here is some example c# code that I have in the CreateUser event of the CreateWizard command.  I also do some stuff after this but I think this is the code you are interested in.     protected void CreateUserWizard1_CreatedUser(objec...

How can I carry anonymous users profile information to authenticated user
HelloI can carry the anonymous users profile information like favourite team name etc but when the user logs in how can I  carry the profile knowledge to the authenticated users profile.Good Nights Please provide some more information about the hangup. At least I couldn't understand what exactly are you trying to achieve. So simple... yet so effective.My "Life"ly Blog You need to add the Profile_MigrateAnonymous event in your global.asax. Here's a sample: void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e) { //Migrate Profile Profil...

Profile Information of User
I have a static class and a static method within the class that I want to use to return the profile of a member. This is the method:public static ProfileCommon GetProfile(MembershipUser usr)       {           ProfileCommon userProfile = null;           userProfile = userProfile.GetProfile(usr.UserName);           return userProfile;       }This is throwing an error so I am enquirying i...

Single Users Profile and All Users Profiles List
I've made a discussion forum. And I have also installed simply membership. Now I want after click on user link to redirect to the page with User's info.I have simply user "John" and user "Bob" and everyone can click on those names and will see page with informations stored in Profile (Like Profile.Name, Profile.Address). I have three simply question:1. How to show profile values of other User ? Like I wrote above.2. How to list all users with for example their e-mails ? I mean: UserLogin - UserName - UserMail3. Or the easier way is to make new table with those all information an...

Modify user profile information
Hi,I would like to modify the user profile information in the CSK and am struggling with how it all hangs together. Does somone have a step by step instruction for how to for example remove the ICQ field from the registration form ? I understand the database and stored procedures tasks, but need to understand the steps involved in changing the forms.Many thanksNiclas the plact to start would be in the solution explorer in visual studio go to comunitystarterkit/engine/framework/users/from there it sounds like you need to remove what you dont want from the following  .../components/prof...

Modifying user profile information
Hi,Does anyone have a step by step instruction for how to modify the user profile information. I would like to add some fields and remove some of the default (using DNN 3.1.1). Would like to understand what files and database fields requires to be updated.Many thanksNiclas  In the current implementation this would require you changing the info object, controller classes, along with the web.config and the register.ascx.  You could also write your own profile provider but that is no small task. Chris Paterra I believe that there is a thread going in the main DNN forum ...

List of all users and their profile information
Hi there,Can anybody help me to get list of all users and their profile information ?Thanks a lot. ...

SQLGrid User Profile information?
I'm trying to use the excellent SQLGridSelectedView to show a view of the User's profile, but am not sure how to access the 'City' data. Everything works accept for that. Any help?select users.username AS 'User Name', users.firstname AS 'First Name', users.lastname AS 'Last Name', roles.rolename AS 'Role', AS 'Email', aspnet_Profile.City from users inner join aspnet_ProfileON users.userId = aspnet_Profile.UserId inner join userroles on users.userid = userroles.userid inner join roles on userroles.roleid = roles.roleid inner join aspnet_users on users.username = a...

could we add information to the User Profile ... ?
Hello, I'm developping a site with the Community Starter Kit, it is very usefull ! I just miss that we can't find the Birthday of a user in the current form. So I'd like to add this information for each user ... Is it possible ? because we don't have any access to the register form, don't we ? I was thinking of creating my own form and had these additionnal informations by my own, and store them in Community_Users table ... do you think it is possible and a good way ? is there any simple solution ? thanks a lot It should be rather simple to do this, though there are chang...

Extracting User Profile Information
This may seem real stupid....has anyone created any mods that help with extracting certain or all user profile information out from CSK as controls to say a text file? Minesh...

Access profile information for a user
Hi - I am using .net2/VB, and have a party booking system. I store some additional info (address, postcode, fullname etc) in the Profile object for each user, so I can access it as the logged in user from code, such as tbAddress.text = profile.Address. If I log in with an admin type account, can I access the profile information for a specific user? eg. is there something like: Dim userprofile As ProfileUser = Profile.GetProfile(username) tbAddress.text = userprofile.Address Thanks for any help, Mark Try below code Dim user As MembershipUser = Membership.GetUser(username)Dim use...

.Net 2.0 User Profiles
Hi all, Quick question:Does anyone know how well the .Net 2.0 user profiles framework scales to enterprise applications? Is it a valid building block for high visitor level sites? A million or so users? Does the community generally envisage using the profiles as a framework to build on for custom solutions?Any of your thoughts would be greatly appreciated!Thanks Ok, I have just written my own membership provider and will be doing the same for Profile and Role providers, I guess i'm answering my own post really... For those that haven't got to it yet, the default implementations that MS ...

Web resources about - User Profile Information -

Information - Wikipedia, the free encyclopedia
Information (shortened as info or info. ) is that which informs, i.e. an answer to a question, as well as that from which knowledge and data ...

InformationWeek – Latest Information Technology (IT) news & IT articles - Technology news - IT magazine ...
InformationWeek provides latest Information technology (IT) news online & articles and publishes latest tech news & IT magazine for Indian IT ...

Federal government assessed Adani information but didn't investigate
Links between Indian mining giant Adani's Australian head and mining pollution in Zambia weren't uncovered by the federal government despite ...

Network tools and adverse information
... We tracked what searches were used from both the public side and the password protected member side (that data was linked to member information ...

Bobby Jindal Demands Information About Obama’s Syrian Refugees Entering New Orleans
In a letter to President Obama, Louisiana Gov. Bobby Jindal demanded information about the Syrian refugees entering New Orleans.

Russian plane crash: $50M reward for information -
... plane crash in Sinai, Egypt, last month was caused by a bomb, the Russian FSB chief says, and Russia offers a $50 million reward for information. ...

Low-Skilled Labor Markets Need Better Information
Employers can tell a lot about someone who went to college based on their resumes. The school they got into, what they majored in, awards won, ...

Transpose focuses on business customers, starts charging for its information management platform
... business customers. The service began in 2014 as a note-taking application called KustomNote, but it has since grown into a more holistic information ...

UN Urges Release of All Information on Hammarskjold Death
UN urges all countries to release information on 1961 crash that killed UN chief Hammarskjold

Jenny McCarthy: Knowing co-star Charlie Sheen was HIV+ would have been 'valuable information'
Jenny McCarthy is not throwing her support behind Charlie Sheen in light of his revelation this week that he was diagnosed as HIV-positive four ...

Resources last updated: 11/21/2015 4:41:05 AM