Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to get the loged in user ID
Message
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01471353
Message ID:
01471362
Views:
38
>>>Sorry for about that. I am using the built in Membership controls. It works quite well except I need to get the user ID that is stored in the aspnet_Membership table. I found the user name in Page.User.Identity.Name. I really don't want to make another trip to the database just to get the userid.
>>>
>>Found this http://www.andreas-kraus.net/blog/aspnet-membership-get-the-userid-of-the-user/
>>
>>I've searched through my own web pages but didn't find anything relevant in pages I scanned through. I think the above is how we accessed it, but don't recall details exactly.
>
>That's exactly the same as my suggestion anyway.....

I thought it was different... But may be it is the same. E.g. Membership.GetUser(); // Does it require a trip to database?

Update. Re-read your suggestion again - yes, it's the same.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform