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?


3/5/2009 2:57:38 AM 27051 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 19

I get the answer:

1.get all user

2. create profile

3. get the fullname to compare and get the ID


3/5/2009 4:30:10 AM


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 your code]

And at a time of retrieval you can fetch loginID using full name like as given below:

long loginID = (long)HttpContext.Current.Profile.GetPropertyValue("FULLNAME");

Pls give a try and let me know if you need any help

Happy Coding!!


Kiran Patil

Kiran Patil
3/5/2009 5:01:59 AM

Similar Artilces:

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 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 Developer VB:Dim usr as MembershipUser=Membership....

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

Can't get ntlm user login name, always returns user aspnet
Hi all, I've tried environment as well as and both return the same user:ASPNET. I have set the website to use NTLM and use a completely different login (bob\bob) and it always says user name is aspnet.  I am thinking that since it's an aspx page that there is some impersination or the aspx server side is using that accnt for running the pages.  How would I get the acutal NTLM user name? Any ideas would be greatly appreciated.   Thanks Sounds like you need to do a "authentication = Windows" and "impersonate = true" in your web.config file....

get User ID from current user
hi, i'm trying to log database activity. therefore i need the user-id of the currently logged-in user. For the login i used the login-controls that come with VWD and set up a MS SQL Server 2000 Database for data storage. That part works fine, but i've found no way to get the id.i'd be glad for some hints.Thx, SönkeP.S.: found things linke and membershipuser.providerkey (or sth) - but this didn't help me. Are you aware of where the users are stored in the database?  Did you configure the personalization providers from the default?  If not, open up ASPNETDB.MDF a...

get user name by user id
hi i send the user ID to a page and there i wanna find the user name. can you please let me know how to find a user name by user id? tanks  Are you using Active Directory? If so check out this tutorialCommunity Coder Hi you can pass the Guid USerId to Membership.GetUser method,MembershipUser usr = Membership.GetUser(UserIDAsGuid); string userName = usr.UserName; // to get the current logged in username , just use HttpContext.Current.User.Identity.Name;    Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed som...

Get the User Name for a login user
Hi Guys, How can I get the current loged in UserName in windows in MSSQL? The problem is: Users login into their PC (Windows Login) Enter a URL of the intranet application They would then be able to access the web base application (Intranet) The web application has a string connection to make a connection to the database I want to have a Trigger for my "products" table so if the table is modified (Insert/Update)  all those changes be entered in "products_Audit" table Now on "products_Audit" table I have a field "ChangedBy" where I want to store the windows loged...

login script provided--User cannnot login as local user the script fails but can login as local admin on xp pc
> Hi all > the error is as follows > novell client scripts has encountered a problem > and needs to close > the exception unknow s/w exception 0xc06d007e > occured in the application at location ox77e738b2 > I have never seen this before and i have tried reinstalling the cleint > but it didnt work. This occurs when the user ins logged into a xp pro pc > as a user though it doesnt occur when logged in as a local admin on the > box. this is only happening on one box. > Login script is below > MAP ERROR OFF BREAK OFF if member of ".every...

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. Hope this helps.  hi thank you for your reply :) i have deleted enablePasswordReset="t...

Can create new user, cannot login as that user.
Using membership and roles with ASP.NET, I can create a new user and the user is inserted into the SQL login database.  I then turn around to login as that user and authentication fails. Thanks, -Nicolas- Can you provider more details? Which conrol are you using? And how do you do the login?  Zhao Ji MaSincerely,Microsoft Online Community Support“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the th...

how to get the user id of the currently logged in user?
hi,       m develoing a site whereby employees are supposed to log in and take orders.  the users are being created thru the ASP web Administration tool and stored by default into the SQL Server Database named AspNetDB.mdf that's stored in the App_Data folder of our website. the database is created auomatically. How to display the userid as this userid is too complicated and there can be many users with the same username. You can use the Membership class to get the info about a user: Membership.GetUser() The GetUser method can also take a username as a...

How to get user id after login
I have a table for the member information I want to capture and maintain.  My intent is to have the memberID the same as the userID generated when a new user is registered.  This memberID will be both a primary and foreign key.  How can I determine what the userID is after the user has logged on?There are reasons for using a separate table and not profiles or modifying the table used by the membership provider.  These solutions won't work for me.   maintaining a separate table will do what I need, but I need to be able to find the member based on the login - hen...

Creating a user to login with using the Login Control and the Ad provider... can't log user in after creation
  Hi I'm trying to create a user in AD from a web form, and then have the user be able to login to a web form with the login control and the Ad provider.   I have a user created by someone else in AD that can log in, but when I create the user using the code below they can't login.   Does anyone have any idea what I'm not doing to enable this user correctly, hes in the same ou and the same groups as the user that can login. the only difference i can see is the display name is not set and the AdminCount has not been set yet...&n...

Getting error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" on trying to authenticate a user
Hi, I created aspnetdb on Sql Server 2005 and modified my web.config LocalSqlServer connection string to connect to the Sql Server instead of mdf file on Sql Server. When i click Log In button on my login control i am getting the error "Login failed for user ''. The user is not associated with a trusted SQL Server connection" But when i bind a radio button list or any control to select from aspnet_users or roles table data is displayed fine without any login errors (i am using aspnetdbConnectionString given below for binding data). Why is it happening only when i authenticate but...

Web resources about - How can I get the user login ID by user Profile.FullName -

Sign in Sign up Charlene Li @ charleneli San Mateo, California Founder, Altimeter Group. Author, Open Leadership. Co-author, Groundswell. Spouse, ...

Sign in Sign up Eldar Murtazin @ eldarmurtazin К вопросу о вреимени работы galaxy s3. Часов пять музыки. Десяток фото. Одно видео. Час в сети ...

Married and maiden names - Wikipedia, the free encyclopedia
A married name is the family name adopted by a person upon marriage. When a person assumes the family name of his or her spouse, this name replaces ...

Slaveholders and African Americans 1860-1870
Largest slaveholders from 1860 slave census schedules and surname matches for African Americans on 1870 census

Terms :: Cream – The Innovation Exchange
By using Cream you agree to be legally bound by theseTerms.  These Terms may be updated from time to time withoutnotice to you. You should ...

Ember.js - About
App.Person = DS.Model.extend({ firstName : DS.attr( ' string ' ), lastName : DS.attr( ' string ' ), fullName : function () { return this .get( ...

Rat World - By Sim Chi Yin - Foreign Policy
Picture Beijing, and a skyline of fancy steel architecture and clouds of smog likely come to mind. But the most fitting metaphor for the city's ...

Tony Campana Stats, News, Pictures, Bio, Videos - Chicago Cubs - ESPN
Get the latest news, stats, videos, and more about Chicago Cubs center fielder Tony Campana on

First example of a very simple type provider
I have an idea for a type provider, so now that the type provider bits are finally publicly available I set to work building it. However it turns ...

Play 2.0 with Scala and Scaml, Part1: Setup of test infrastructure, model and persistence with Anorm
In this series I’ll try to provide some help on topics I had problems with when I implemented my first Play 2.0 project. My goal is it to get ...

Resources last updated: 12/12/2015 3:06:57 AM