<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jholjhapata.com/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Cookies</id>
	<title>ASP.NET Cookies - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jholjhapata.com/index.php?action=history&amp;feed=atom&amp;title=ASP.NET_Cookies"/>
	<link rel="alternate" type="text/html" href="https://jholjhapata.com/index.php?title=ASP.NET_Cookies&amp;action=history"/>
	<updated>2026-11-12T13:19:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://jholjhapata.com/index.php?title=ASP.NET_Cookies&amp;diff=138&amp;oldid=prev</id>
		<title>Admin at 17:28, 9 May 2020</title>
		<link rel="alternate" type="text/html" href="https://jholjhapata.com/index.php?title=ASP.NET_Cookies&amp;diff=138&amp;oldid=prev"/>
		<updated>2020-05-09T17:28:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 17:28, 9 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;seo metakeywords=&amp;quot;Cookies,ASP.NET Cookies&amp;quot; metadescription=&amp;quot;Cookies,ASP.NET Cookies&amp;quot;/&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Cookies is a small piece of information stored on the client machine. Its is used to store user preference information like Password, City, SessionId etc on client machines. We need to import namespace called  Systen.Web before we use cookie(HttpCookie).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Cookies is a small piece of information stored on the client machine. Its is used to store user preference information like Password, City, SessionId etc on client machines. We need to import namespace called  Systen.Web before we use cookie(HttpCookie).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Type of Cookies ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Type of Cookies ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>https://jholjhapata.com/index.php?title=ASP.NET_Cookies&amp;diff=113&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Cookies is a small piece of information stored on the client machine. Its is used to store user preference information like Password, City, SessionId etc on client machines. W...&quot;</title>
		<link rel="alternate" type="text/html" href="https://jholjhapata.com/index.php?title=ASP.NET_Cookies&amp;diff=113&amp;oldid=prev"/>
		<updated>2020-01-23T16:11:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Cookies is a small piece of information stored on the client machine. Its is used to store user preference information like Password, City, SessionId etc on client machines. W...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Cookies is a small piece of information stored on the client machine. Its is used to store user preference information like Password, City, SessionId etc on client machines. We need to import namespace called  Systen.Web before we use cookie(HttpCookie).&lt;br /&gt;
== Type of Cookies ==&lt;br /&gt;
* '''Persistent Cookie''' - Persistent cookies are permanent cookies.They are stored as a text file in the hard disk of the computer.&lt;br /&gt;
* '''Non-Persistent Cookie''' - These cookies are also known as temporary cookies or session based cookies.They are active as long as the browser remains active. Once the browser is closed the cookies vanishes automatically. &lt;br /&gt;
== Create a cookie ==&lt;br /&gt;
In the Asp.Net with help of Response object or HttpCookie we can create a cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example 1'''&lt;br /&gt;
    HttpCookie info = new HttpCookie(&amp;quot;info&amp;quot;);&lt;br /&gt;
    info[&amp;quot;UserFirstName&amp;quot;] = &amp;quot;Soumya&amp;quot;;&lt;br /&gt;
    info[&amp;quot;UserLastName&amp;quot;] = &amp;quot;Das&amp;quot;;&lt;br /&gt;
    info.Expires.Add(new TimeSpan(0, 1, 0));&lt;br /&gt;
    Response.Cookies.Add(info);&lt;br /&gt;
'''Example 2'''&lt;br /&gt;
    Response.Cookies[&amp;quot;UserFirstName&amp;quot;].Value = &amp;quot;Annathurai&amp;quot;;&lt;br /&gt;
    Response.Cookies[&amp;quot;UserLastName&amp;quot;].Value = &amp;quot;Black&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Retrieve value from cookie ==&lt;br /&gt;
In the Asp.Net with help of Response object or HttpCookie we can retrieve cookies.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Example 1'''&lt;br /&gt;
    string UserFirstName = Request.Cookies[&amp;quot;UserFirstName&amp;quot;].Value;&lt;br /&gt;
    string UserLastName =  Request.Cookies[&amp;quot;UserLastName&amp;quot;].Value;&lt;br /&gt;
'''Example 2'''&lt;br /&gt;
    HttpCookie reqCookies = Request.Cookies[&amp;quot;userInfo&amp;quot;];&lt;br /&gt;
    if (reqCookies != null)&lt;br /&gt;
    {&lt;br /&gt;
        string UserFirstName = reqCookies[&amp;quot;UserFirstName&amp;quot;].ToString();&lt;br /&gt;
        string UserLastName = reqCookies[&amp;quot;UserLastName&amp;quot;].ToString();&lt;br /&gt;
    }&lt;br /&gt;
== Cookie's property ==&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Property !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Domain || Which is used to associate cookies to domain.&lt;br /&gt;
|-&lt;br /&gt;
| Secure || We can enable secure cookie to set true(HTTPs).&lt;br /&gt;
|-&lt;br /&gt;
| Value || We can manipulate individual cookie.&lt;br /&gt;
|-&lt;br /&gt;
| Values || We can manipulate cookies with key/value pair.&lt;br /&gt;
|-&lt;br /&gt;
| Expires || Which is used to set expire date for the cookies.&lt;br /&gt;
|}&lt;br /&gt;
== Advantages of Cookie ==&lt;br /&gt;
* Its clear text so user can able to read it.&lt;br /&gt;
* We can store user preference information on the client machine.&lt;br /&gt;
* Its easy way to maintain.&lt;br /&gt;
* Fast accessing.&lt;br /&gt;
== Disadvantages of Cookie ==&lt;br /&gt;
* If user clear cookie information we can't get it back.&lt;br /&gt;
* No security.&lt;br /&gt;
* Each request will have cookie information with page.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>