C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...









Cookies and Session Definitions with Example


Posted Date: 07 May 2008    Resource Type: Definitions    Category: General

Posted By: Palani Thirumal Valavan       Member Level: Silver
Rating:     Points: 5



Cookies

A Cookie is a small text file that the browser creates and stores on the hard drive of your machine. Cookie is just one or more pieces of information stored as text strings.

It is used to store the data’s temporarily.

The System.Web namespace offers a class called HttpCookie to create Cookies

Page 1

Response.cookies(“mycook”) (“name”) = Textbox1.text

Page 2

Dim DD as string

DD = request.cookies.item(“mycook”).value

User.Identity.Name is used to read the identity that is stored in the authentication cookie

Session

A session is defined as the period of time that a unique user interacts with a Web application. (We can create Time Allocation and Time Scheduling)

Page 1

Session (“Myses”) = Textbox1.text
Response.redirect (“webform2.aspx”)

Page 2

Textbox1.text = Session (“Myses”)

Default session time out is 20 minutes




Responses

Author: chaithanya    15 Jun 2008Member Level: Silver   Points : 1
Nice article which gives brief usage of Sessions and Cookies.


Author: Shahram    15 Jun 2008Member Level: Bronze   Points : 2
Hi It's Too Nice but i mustly Use session on my asp websites and also in your artickel it's better to write that session have to define in global.aspx page and then use in normal forms
Be Successfull
Shahram


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Life cycle of ASP.Net Web Form
Previous Resource: Isolation Level
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

masks masks masks

Contact Us    Privacy Policy    Terms Of Use