Click here to Skip to main content
15,795,496 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,
I would like to create a simple website.As the user log on to the
website he should get the user specific information only.How can I use the session to retrieve the user specific information???How to pass the values to data base for accessing the user specific information???Please help me...

Hi In VB also,
the namespaces are same.
you can easily convert the code.

Here solution of Session:

Create a Class Named Employee which will hold values like ID, username, email etc.
then store that into session like:

Employee obj;
//Set values into obj
Session["UserInfo"] = obj;

//Code to retrieve from session

if(Session["UserInfo"] != null)
    Employee obj = Session["UserInfo"] as Employee;
    //This object contains all the information
Share this answer
aswathy.s.88 11-May-10 8:42am    
May I ask few more questions?
Would you plz help me?
Jitendra Zaa 11-May-10 8:42am    
sure... you can
aswathy.s.88 11-May-10 23:40pm    
Can u tell me more about
Jitendra Zaa 12-May-10 0:37am    
What you want to know ???
you can ask
Share this answer
aswathy.s.88 11-May-10 8:35am    
I want the code in VB
Hi aswathy,
What exactly you want to know ?
How to store the data in session or how to retrieve data from DB?
Share this answer
aswathy.s.88 11-May-10 8:33am    
Both I want...
I mean I'm a user entering into a site.So I should get the information related to me and at the mean time I must keep a session to identify the user...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900