| Author: K'ran 05 Jul 2009 | Member Level: Gold | Rating:   Points: 3 |
Basically we are using sessions and cookies all of these to maintain state management
1)Cookies is very light weight and they are store only string values and store in client side (browser)
2)very limited size
3)But session can store any type of data and session is transfer data from server to client
for more info
http://msdn.microsoft.com/en-us/library/75x4ha6s.aspx
Kiran Kumar Koyelada
|
| Author: Devendra 05 Jul 2009 | Member Level: Gold | Rating:   Points: 3 |
1)What is the use of sessions? Session Is Browsers specific Variables which stores the data at server side
2)Why we don't use cookies instead of sessions? We Use Both as per our need.
3)what we store in a session? and how with ex? In Session We use those vaibels which we want to keep at server side and want to use through out website Like UserId after Login
To set Session variable Session["UserId"] = GetUserId;
To get Session Variable string UserId = Session["UserId"].ToString();
4)will we use sessions and cookies? Yes Both can use in Same Application
5)what are the advantages and disadvantages of cookies and sessions. There Are many advantages and disadvantages of Cookies please refer MSDN. But one thing I want to clear you its totally depend on your requirement.
6)examples of cookies and sessions with some source code? HttpCokiee cok = new HttpCokiee(); cok.Add("Test",Value);
For Session I have Given you already
7)for log in information what all we save in sessions and in cookies? For remember me we use Cookies but for UserId comes from database we use session
Way To Technology Softway India
|