Manage Users - how can I get all users with their profile datas?

Hello,

I would like to manage all available users with their custom profile datas, eg. firstname. I can get the profile datas of the logged-in user (VB code: txtBoxFirstName.Text = Profile.FirstName) but how can I list all the not-logged-in users with their usual datas (eg. e-mail address) and their profile datas?

Thank you in advance

 

0
Malark
1/2/2006 11:28:36 AM
asp.net.security 27051 articles. 1 followers. Follow

2 Replies
805 Views

Similar Articles

[PageSpeed] 15

Because of performance issues I don't recommend you to use the Profile if you need to list all users’ properties on a single page. But if you only have a few users, then it's fine ;)

To get the profile for all users you can for example iterate through all the users and use the Profile.GetProfile method to get a specific profile for the current user.

foreach (MembershipUser user in Membership.GetAllUsers())
{
     ProfileCommon profile = Profile.GetProfile(user.UserName);

     ...
}

 


/Fredrik Normén - fredrikn @ twitter

Microsoft MVP, MCSD, MCAD, MCT

ASPInsiders
My Blog
0
Fredrik
1/3/2006 10:42:57 AM

Yes, thank you for helping. Meantime I found this same solution in this forum. But with it I can't modify the datas. How can I change eg. the standard e-mail address and eg. FullName property, what is in my custom profile? I tried it as I wrote here, but it was unsuccessful.

I could get the datas:

Sub Page_Load(ByVal s As Object, ByVal e As EventArgs)

If Not IsPostBack Then

      txtFullName.Text = Profile.FullName

      txtEMail.Text = Membership.GetUser.Email.ToString()

End If

End Sub

 

and I tried to modify it, but it doesn't work:

 

Sub btnModify_Click(ByVal sender As Object, ByVal e As System.EventArgs)

Dim p As ProfileCommon = Profile.GetProfile(Membership.GetUser.UserName)

p.FullName = txtFullName.Text

p.Save()

End Sub

What would be the problem? Is there a sample where I can find information how can modify users data? I seek it so much, but I did not found. Sad [:(]

0
Malark
1/3/2006 2:48:11 PM
Reply:

Similar Artilces:

How can I get the user login ID by user Profile.FullName
I have a multiple user fullname list in a page(the fullname is stored in Profile). I need to save the user LoginID into the database when I select the user fullname.How can I get the user login ID by user Profile.FullName?Thanks. I get the answer: 1.get all user 2. create profile3. get the fullname to compare and get the IDCheers*  Hi,As per my understanding you have Key = Value pair where Key =  FullName and Value=LoginID. What i would suggest that you store this key value pair in Profile using HttpContext.Current.Profile.SetPropertyValue(FULLNAME,LOGINID); [Put it once in...

how to get user data from a logged in user
I have the standard login controls from ASP.NET 2.0 on my site. Now i've added a id field from another table to the aspnet_users table as FK. Now i want to use this ID (if the user is logged in) to populate my datagrid. How can i get this ID?  Erik    Check below link Work With Membership API HCHaissam Abdul MalakMCAD.NET| Blog | Hi Please follow the link http://forums.asp.net/thread/1702250.aspx and raise the problem you've meet :) Good luckBest RegardsXiaoYong DaiMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the ...

manage default user profile for all users
We're are halfway through a rollout of all new machines (W2K SP3). I just discovered that you can change the default user profile to a custom one by copying over the default user profile in W2k. This could save me tons of time, as it takes care of all the nitpicky stuff (IE6, Office 2k, media player, etc) that one has to setup for each user. Unfortunately, we've already ghosted our machines with the standard default user profile (and I'm not planning on going back and reloading a custom profile on each machine). My question is this. Is it possible using z...

Unable to cast object of type 'WIM2008_Web.App_Code.wim.security.data.User' to type 'WIM2008_Web.App_Code.wim.security.data.User'
I don't know if i post this in the rigth forum but it is related to database call. this is my code: public DataSet CustomerDetails_Select(Int32 ID)    {      DataSet ds = new DataSet();      WIMConnect wimcon = new WIMConnect();      WIMConnection cnnwim = new WIMConnection();      ConvertDataReaderToDataTable DrToDs = new ConvertDataReaderToDataTable();      GridViewHeadersDao gvh = new GridViewHeadersDao();       &nb...

password recover ? it sent me new user password, how can i get user password ? (not new user password )
hi password recovery sent me new user password, how can i get user password ?(not new user password) it also changed user password to new user password. i want that it should not change user password how can i do this ? SincerelyMark as me if my question or my answer can be helpful for you :) Refer to these two articles.http://msdn.microsoft.com/en-us/library/ms178335.aspxhttp://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/passwordrecovery.aspx Hope this helps.  hi thank you for your reply :) i have deleted enablePasswordReset="t...

Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection
This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database) Help pleaseee Hi You could take a look at this : http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=152338&SiteID=1Sincerely,Young Fang Hi ...

Users Managing Users
I need to create groups of users (Distributors) and in those groups, allow one of them to be able to create new users for that group.  Each Distributor managing their own group of users. I am wondering if this could or should be a module or should I start hacking the source.? For this instance, I'd say create yourself a custom module.  The "hack the source" approach tends to introduce issues over time.  :-)Bill KnausBlog: http://life.billknaus.com/blogs/ymmv/Website: http://billknaus.com/ Check out WorkControl-UserManager http://www.workcontrol.com/Products/Use...

How to get a user profile data
I'm using Profile to add FirstName and LastName for users on my web page, But now I would like to add an admin page where I can view a selected user's Profile data. I found out how I get Profile data for the current user, but how do I do it on a selected user (when I'm logged in as administrator)? Regards, Sigurd   Hi You can create an instance reference of other users profile with the ProfileCommon.Create("username") method, then access the FirstName property of user profile like this: --------------vb.net-------------  &nbs...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

Importing existing user data to the user profile mechanism
Hi everyone, I have redesigned my site from ASP to ASP.NET. I am using the Profile class in my design and everything seems to be working well. Now I am about to go live but my problem is how do I import the existing user data to the new app. Data like display name, address, and other preferences are stored as a field in a user table in the old app and now this data is stored in Profile for each user. Is there an import utility that can help me with this? Thanks  Why don't you create your own custom profile provider to access data in your existing database. The profile da...

How can i get the user id of the user currently logged in?
Hi, I need to get the userId of the user currently logged in. Do I need to use 'user profile' for that? I am using the database schemas installed by the aspnet_regsql.exe. Any suggestions will be very much appreciated. E     Dim user As MembershipUser        user = Membership.GetUser(True)        Label1.Text = user.UserName If this post was useful to you, please mark it as answer. Thank you!Regards.mimranshafiq.NET Web Developerhttp://www.dotnetclassic.com VB:Dim usr as MembershipUser=Membership....

how can I reteive the profile of a user that is NOT the current loggedin user on the client?
with the asp.net ajax....  I have read the documentation about the profile servie but it seems everywhere it always says :" this loads the profile of the CURRENT user etc...   where I would want to access profile properties of other users as well how? is it possible?   yes you can... the whole data is stored in a standard table for profile provider which is aspnet_Profile, you can communicate with it like any other tabel (insert, update & delete)...Regards...Nassar, RamiMy Blog || E-Mail Don't forget to click "Mark as Answer" on the post that he...

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...

How should i Render Appropriate User-Entry For Getting User Data Dynamically?
Hi all Recently i was asked to design and implement an On-line WebSite for a Shop Store.I decided to define some Category for this Shop's Products such as MP3-Players,Mobiles,Televisions,Monitors and so on....and then Assign each product to a certain Category.Something like Amazon.Com , So i designed my Category and Product Table as follow: Category Table----------------CatID    int Primary-KeyCatDesc  varchar(50) Product Table-------------ProductIDProductDescCatID After that i noticed that each category has its own Fields and Property and sometimes somecategorie...

Web resources about - Manage Users - how can I get all users with their profile datas? - asp.net.security

Profiles - Wikipedia, the free encyclopedia
I've certainly enjoyed working with Rick... I think it's useful and important to change the people you work with. You get so stuck in certain ...

Profile - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Study: Comments On Facebook Profile Pictures Affect Perceived Attractiveness
Comments left on Facebook profile pictures “strongly affect the level of perceived attractiveness of the profile owner physically, socially, ...

Uber iOS app adds credit card profiles, allowing you to separate business & personal rides
... expenses. But the service now allows you to register a second credit card for business use, and then simply tap your Personal or Business profile ...

A High-Profile Law School Dean’s Sudden Departure
Why is this dean leaving so soon after having his contract renewed?

The Kobalt diaries: profiles
When I started thinking about how profiles should work in Kobalt, I realized that the simplest approach I’d like to see in a build tool is defining ...

Colorado: Expanded Background Checks, ‘High Cap’ Mag Ban, High Profile Shootings
Colorado: Expanded Background Checks, 'High Cap' Mag Ban, Mass Shootings

Square raised a lot less money than other high-profile tech IPOs of the last 5 years
... . But the real purpose of going public is to raise money for continuing operations. Square's IPO was smaller than a lot of other high-profile ...

Tom Brady’s GQ Man of the Year profile is a study in surly deflection
I went into Tom Brady’s GQ Man of the Year cover profile thinking it was going to be just another piece of BS frat-bro hagiography. Some people ...

Future Siri could switch user profiles based on voice
As Apple rolls out Siri beyond the iPhone and into shared devices like the iPad and, most recently, Apple TV, Cupertino’s engineers have been ...

Resources last updated: 12/1/2015 12:21:53 PM