Link to home
Start Free TrialLog in
Avatar of CPGHelpDesk
CPGHelpDesk

asked on

How can I use a username / password that i've created in a sql database and carry that throughout my asp.net (vb) application

I am running into the following problem with my asp.net (vb) app:

I have created a SQL Database for my one applictaion that i'm working on, this database houses all of the login information for this particluar application ( name's, info, and then a username / password tied to them).  I have created a logon page for my asp.net application.  from that login page I want to be able to capture the USERNAME and PASSWORD which is entered to get into the application and have it attched to the user when they are using the application.  

For example:

I log into the application at the logon page (which is the first screen that appears).  my logon name is rboyle.  Once I am redirected to the next page I want to be able to reference that it is rboyle that is logged into the application so that I can reference that on particular parameter and pull up different information from the database based off it.  How can I do this?  If anyone has any ideas / suggestions / and / or any sample code that would be great.    
Avatar of anoyes
anoyes
Flag of United States of America image

I assume that you are able to log in properly.  You can use User.Identity.Name to get the username of the currently logged in user.  So for example if you had a label Label1 that you wanted to display the username, just use Label1.Text = User.Identity.Name

Hope this helps!
Avatar of CPGHelpDesk
CPGHelpDesk

ASKER

no i'm not able to log in properly yet:

1. I want to tie the application into my SQL 05 database that i've built for this project.  Get the username / password from the user's records w/n the database (so i'm not interacting w/ my AD at all).  

2.  After verifying who has logged in I want to carry that value from the logon page throughout the rest of the application.  Reason for this is the info I need to process w/n the application is based on what user is logged into the app.  

any examples / help  that you guys can give me would be great.  

best regards,

ryan
ASKER CERTIFIED SOLUTION
Avatar of anoyes
anoyes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
to save time here is what i'm going to do..i'm going to hold off on the validation portion for right now.  

I need to be able to share a string varable accross multiple pages, how can i possibly do this.  

For example on my logon page i have current_user which is a string variable
I want to be able to get the value of this variable wherever i am in the application, can someone briefly describe how i go about doing this.  

thanks.  

ryan.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial