Getting / Editing a users profile information

    I have been trying to take advantage of the net User / Profile model in ASP.NET 2.0, and I can't figure out how to create an admin page and change the user's profile.

I need to figure out how to get and change a user's profile from code.  None of the articles that I have run across talk about this.  Does anyone know of a good article on creating an adminstrator profile edit page?

Thanks.

AJAX Programming Tutorials
0
RyanSmith345
1/25/2006 10:08:11 PM
asp.net.security 27051 articles. 1 followers. Follow

3 Replies
529 Views

Similar Articles

[PageSpeed] 20

It's pretty straightforward. Let's say you have a Profile property defined in your web.config called "WebsiteURL". To set the property you would do something like this:

Profile.GetProfile(username).WebsiteURL = "http://www.microsoft.com"

0
KevinK3344
1/26/2006 2:57:10 AM

Actually the better way is to use the ProfileCommon class...

Dim p as ProfileCommon = Profile.GetProfile(username)

p.WebsiteURL = http://www.microsoft.com

p.Update

You need to call the Update method to save the value back to the datastore. You can use the shorthand method above to retrieve the value later.

0
KevinK3344
1/26/2006 4:00:50 AM
So here was my problem,  I was trying to access this from an external class, and I couldn't call the Profile.GetProfile method.  So what I ended up with is:

        Dim p As New ProfileCommon
        p = p.GetProfile(UserName)

and now I have a profile that I can use just like normal.  Thanks for the help.

AJAX Programming Tutorials
0
RyanSmith345
1/26/2006 4:15:07 PM
Reply:

Similar Artilces:

Security Best Practice
Can somebody provide some guidance on how I should be implementing the following: All site users are either Subscribers or NonSubscribers.  On some pages, I want to block NonSubscribers from accessing the page ("Sorry, this area is only for subscribers!).  Want I am currently doing is the following:if (!((CustomMembershipUser)Membership.GetUser(HttpContext.Current.User.Identity.Name)).IsSubscribingMember) {Response.Write("You must be a subscribing member!!!"); } Now I'm pretty sure this works, but it seems like a great deal of effort and database calls to f...

How Can get Profile Information when new user register
hi everybody i want when new user create his/her account , i get addetional information such as Telephone number i customize CreateNewUser control and add Telephone textbox but user didn,t autenticate and when i use this code Profile.Tele = txbTelephone asp.net throw exeptionMahdi Negahiwww.iranBuyCenter.com ProfileCommon p = (ProfileCommon) ProfileCommon.Create(CreateUserWizard1.UserName, true);p.Tele = txbTelephone; //see how you grab this from CUW in the link belowp.Save(); check this: http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx /GuruBhai...

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

Get Some profile information from another profile!
I need the company name of a company wich has a username. But i am not logged in as that user name.So how can i get it ?I thought like this:             ProfileCommon p = new ProfileCommon();            p.GetProfile(UserName);                        lblInfo.Text = p.Bedrijfsnaam;  I'll added bedrijfsnaam manually to the profile, i can safe it and its stored in th...

Setting & Getting profile information from a .net console app.config file
Hi There, I am creating a windows app for our developer who will be populating user account information over to our website. I thought the best way to do this would be to follow the .net membership provider model and to use it's interface into the asp.net roles/ user database as created via the aspnet_regsql.exe script. From the console app, I can create a user without a problem via the Membership.CreateUser() method, however I can not populate any of the profile properties (i.e. Profile does not even appear as a class that can be referenced even though I am referencing System.Web.Prof...

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

Manage Users
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   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 examp...

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

Problem getting a Datagrid to allow users to edit it...(in line editing)
Hi, In my DNN custom module I have three panels with various controls on them. If a user clicks the "edit database" button...it makes all these panels disappear and one appear. That panel has a datagrid on it. My goal is to allow users to manipulate the database information using the datagrid. The datagrid is bound to a dataset which is pulled from the database and the data displays fine. I tried adding a button column to the datagrid (I'm using Visual Studio) and it puts a nice "edit" button to the left of every row in the database. Very nice. My understanding ...

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

need to get a admin profile value and assign it to another users profile
How can I do this? I don't know how to use the profile Base class...please help First you'd better read this article to get some basic knowledge on profile feature. http://msdn2.microsoft.com/en-us/library/2y3fs9xs.aspx I think what you want is ProfileCommon object, right? You can use it like this: ProfileCommon p = (ProfileCommon) ProfileCommon.Create("Admin", true); p.Country = ............. Thanks for the timely response....I will try reading up on the profile object and see if I can figure this out....

How to get user informations from LDAP to squid proxy server/user logging
Hello, I'd like to ask, if there is a way how to get user name to linux proxy server squid. My LDAP database is running on netware 6.0 and I'm able to search it from linux (debian sarge, ldapsearch). But when I try to connect to it using squid_auth_ldap I get this error: squid_auth_ldap[10267]: - trying to connect to: myldap.server:389 squid_auth_ldap[10267]: - connected to ldapServer myldap.server.cz:389 squid_auth_ldap[10267]: - ready squid_auth_ldap[10263]: - got User: cervenka squid_auth_ldap[10263]: - got Password: somethink squid_auth_ldap[10263]: - searchstr: ...

get user information
I am wondering if someone can show me how to get infromation about the users. Specifically, the job (the syntax) the logged on user's doing. I saw the answer somewhere but forgot where. Thanks. Bin get the spid from sysprocesses and do: sp_showplan <spid>, NULL, NULL, NULL "Bin Yu" <b-yu2@uchicago.edu> wrote in message news:3C3F0E36.CE156215@uchicago.edu... > I am wondering if someone can show me how to get infromation about the > users. Specifically, the job (the syntax) the logged on user's doing. > I saw the answer somewhere but for...

Get profile of other users
Hi all,The Profile propery is used to get current user profile. How to get other users profile?   Hi markpp, You can use ProfileBase.Create(userName) method to get other users profile.   Hope this helps.www.stockbiz.vnThe Vietnamese Stock Market and Economy...

Web resources about - Getting / Editing a users profile information - asp.net.security

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

Did Senator Ted Cruz release classified information during Republican debate?
A Republican senator is investigating whether Republican presidential candidate Ted Cruz released classified information while discussing the ...

US gave San Bernardino shooter Tashfeen Malik visa 'despite missing information'
A congressman claims the US approved an entry visa even though Malik never provided the extra evidence requested by an immigration official. ...

Trudeau says improving access to information will make government better
Ensuring Canadians have access to federal information will mean more and sometimes difficult public scrutiny, but ultimately it will lead to ...

Making Access To Information Better Will Make Improve Government, Trudeau Says 54
The Liberals will conduct a "proper review" of the decades-old Access to Information Act with the aim of figuring out "what is actually going ...

Senate Intellicence Committee Chair Burr all but confirms that Cruz leaked classified information at ...
... that, among other things, updates the government’s program of collecting phone metadata. In doing so, Cruz probably leaked classified information. ...

Apple’s Maps app adds Los Angeles public transit information
Apple’s Maps application now supports public transit information for Los Angeles, California, forming a continuation of the service’s gradual ...

It's not exactly the Watergate break-in — is it? — but Bernie Sanders's campaign broke into Hillary Clinton's ...
... Democratic National Committee have accused the presidential campaign of Sen. Bernie Sanders of improperly accessing confidential voter information ...

U.S. Gave Malik Visa Despite Missing Information, Lawmaker Says
Bloomberg U.S. Gave Malik Visa Despite Missing Information, Lawmaker Says Bloomberg The U.S. approved an entry visa for Tashfeen Malik, one ...

Resources last updated: 12/22/2015 2:54:41 AM