473,394 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Cookies gets deleted in asp.net

Hi,

I am using cookies in asp.net web applicaiton to store the referrer name for 50 days. When the user login to the web application the referrer value from the URL is stored into a Cookie with Expiry date as 50 days.

But when the user logout from the web application this cookie gets cleared. In the logout button I have used below lines.
Session.Abandon();
Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));

Now i don't want to delete this cookie on logout.
Any help will be appreciated.

Thanks.
Sep 8 '11 #1
3 3153
Frinavale
9,735 Expert Mod 8TB
Use a cookie that isn't the SessionID.
In other words, create a new cookie for the purpose of retrieving the referrer.

Be aware that some people set the browser to clear all cookies upon closing (I do).

-Frinny
Sep 9 '11 #2
Hi Frinny,

Thanks for the reply, I have kept cookie name as Referrername.

Thanks.
Sep 12 '11 #3
Frinavale
9,735 Expert Mod 8TB
Did that fix your problem?

-Frinny
Sep 12 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Cezar | last post by:
Hi, does anyone know how to create a login system with PHP that does not use cookies? I am finding that more and more users seem to be setting their privacy settings to high, this not accepting...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
3
by: Prakash | last post by:
Below is my code to delete a record in a continuous form. I can't figure out any reason but sometimes (another) record gets deleted instead of where the record pointer is positioned. Small table...
1
by: bob | last post by:
I'm using visual studio and working on some webforms. the last few forms that I have created have been very long and after I save the form - parts of the html get deleted and I lose the objects...
1
by: Thomas Scheiderich | last post by:
Just when you figure out one problem another one shows up. I am trying to set up authentication for one of my folders and can't seem to get it to work as advertised (I am sure I am missing...
2
by: Ryan | last post by:
I've re-written a stored procedure and when I post the following code into the existing SP in EM, is saves OK. However, when I re-edit the SP, the last line 'Commit Transaction' has been removed. ...
0
by: John Dalberg | last post by:
When I add an xsd file to a project, VS2005 created a few files including the designer.cs file. So far so good. However when I change a data type for a column, the whole designer.cs disappers. Is...
14
by: vjayis | last post by:
Hi i m using cookies to store data in an form containing textfields and using the following codes., <?
2
by: Muddasir | last post by:
Hi members, My question is: Is there a way through which anyone can delete a php file from server. like some hacker delete registeration.php file from server (live server) ??? If so. then...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.