Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Cookies storing Problem in C#

Cookies storing Problem in C#

Scheduled Pinned Locked Moved C#
csharpsysadminhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gopinathtamil
    wrote on last edited by
    #1

    public void GetCookie() { string subkeyName,subkeyValue; string str = null; str = Request.QueryString["productid"]; Addtocart.Value = str; Addtocart.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(Addtocart); for (int i = 0; i < Request.Cookies.Count; i++) { AppCookie = Request.Cookies[i]; output.Append("Name = " + AppCookie.Name + "
    "); if (AppCookie.HasKeys) { for (int j = 0; j < AppCookie.Values.Count; j++) { subkeyName = Server.HtmlEncode(AppCookie.Values.AllKeys[j]); subkeyValue = Server.HtmlEncode(AppCookie.Values[j]); output.Append("Subkey name = " + subkeyName + "
    "); output.Append("Subkey value = " + subkeyValue + "

    "); } } else { output.Append("Value = " + Server.HtmlEncode(AppCookie.Value) + "

    "); } } CacheMsg.Text = output.ToString(); } Through above coding we try to store more than two cookies but we didn't achieved.....so is there any way to store more then two cookies

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups