|
-
Aug 23rd, 2004, 08:34 AM
#1
Thread Starter
PowerPoster
detecting username
hi
is there a way in vb.net to detect the username that is accessing the database? or really, is there a way to detect what the current username is of the person that is accessing a webpage?
i basically have a website, and has a form etc... and people log in (automatically from their machine or supplied un/pw) and i want some of the field elements to be populated automatically depending on the username
any ideas?
-
Aug 23rd, 2004, 09:13 AM
#2
I take it we're talking asp.net here....
What method are you using for your users to logon?
Are you using one of the built in methods such as formsauthentication / windows authentication?
If so you can store the username when they login and retrieve it using something like
VB Code:
formsAuthentication.user.id
It's prob nothing like that buti can't check right now.
Otherwise just store the username in a session variable after the user logs in.
-
Aug 23rd, 2004, 09:55 AM
#3
just remembered it's more like
VB Code:
formsAuthentication.user.identity
I'd recommend using built in secruity if you're not already.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|