Groups > Databases > Access Databases and AccessDataSource Control > Re: display user details from a access database based on the asp.net user login




display user details from a access database based on the
asp.net user login

display user details from a access database based on the asp.net user login
Wed, 2 Apr 2008 15:42:03 +0000
Hello nice people,

 I am working on a web application with an access database. i have recently
created a asp.net login control for my login page which means that i set my
users up using the asp.net configuration. i have the users course and study
details in a access database and was wondering if i could display them details
on the web page ONLY for that current user who logged in. i used asp.net login
control as it is much easier but now i am having problems with linking the user
login and my data in the access database. i have used the 'login name' control
to display the users 'student ID'  which is used to login. The control's misc
'ID' is 'StudentID' and i have created a gridview that should display data for
the current user, which is bounded to the access database. for the datagrid view
i set the 'datakeynames' to 'StudentID'. I want to link the gridview with the
'login name' control so that the 'login name' is the parameter for the gridview.
I hope i make sense. If any1 thinks that i should create my own login page
rather than usinng asp.net login control, then tell me. i am using VB in asp.net
for my web application. Please help, i have a deadline coming soon.
Post Reply
Re: display user details from a access database based on the asp.net user login
Wed, 2 Apr 2008 18:52:22 +0000
Hey you won't need to create a login control.

What it sounds like you need to do is just access the username of the current
user and use that for filtering the data.  If so you can retrieve the username
from this property:

HttpContext.Current.User.Identity.Name
Post Reply
about | contact