• Sumit Gupta

  • Menu
  • Ask Me Anything
  • About Me

Sumit Gupta

bookmarking my life


ASP.NET: Why my cookie is not saving

Published by Sumit Gupta on April 19, 2012

Funny, today after years I thought to finally use Cookies in one of my project. It is probably my first attempt to use Cookie in ASP.NET in last 5 yrs. WOW, that is amazing. Anyways, I just notice one thing and thought it might help any first timer, so here is the key note I want to share. In ASP.NET if you want to read Cookie, use REQUEST.Cookies, but if you want to add new Cookie use RESPONSE.Cookies. This is very minor difference and I really waste 30 minutes before I release I was using Request.Cookies to add new cookie, but it won’t get added that way.

Share this:

  • Facebook
  • Twitter
  • Google
Posted in .NET, ASP.NET, C#.NET, VB.NET/VB | Tagged ASP.NET, Cookies

← Previous Next →

Like My Blog !!!

Recent Comments
  • Sumit Gupta on Refreshing USB ports using C#
  • Emre Akarsu on Refreshing USB ports using C#
  • Sumit Gupta on PWNAT : Example
  • xAddict3Dx on PWNAT : Example
  • Merrouche MOHAMED on PWNAT : Example
Meta
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2019 Sumit Gupta. Powered by WordPress and Spine.