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
  1. Home
  2. Web Development
  3. ASP.NET
  4. How I can check cookie enabled or disabled for IE7?

How I can check cookie enabled or disabled for IE7?

Scheduled Pinned Locked Moved ASP.NET
csharptoolshelpquestion
3 Posts 3 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.
  • A Offline
    A Offline
    Ashish Kumar Vyas
    wrote on last edited by
    #1

    Hi, I am using code behind aspx.cs c#: if (Request.Browser.Cookies) lblBrowser.Text = "<b>Cookie Enabled</b>"; else lblBrowser.Text = "<b>Cookie Disabled</b>"; Problem: -I am using IE7 and from tools>Internet Option>privacy -I am selecting Block All Cookies -when again I am tring to run my code it showing cookie Eanbled. Can U solve this problem or give me some relative code. Thanks Ashish

    S G 2 Replies Last reply
    0
    • A Ashish Kumar Vyas

      Hi, I am using code behind aspx.cs c#: if (Request.Browser.Cookies) lblBrowser.Text = "<b>Cookie Enabled</b>"; else lblBrowser.Text = "<b>Cookie Disabled</b>"; Problem: -I am using IE7 and from tools>Internet Option>privacy -I am selecting Block All Cookies -when again I am tring to run my code it showing cookie Eanbled. Can U solve this problem or give me some relative code. Thanks Ashish

      S Offline
      S Offline
      Spunky Coder
      wrote on last edited by
      #2

      Request.Browser.Cookies tells whether browser supports the cookies or not... it doesn't gives the value whether the cookies are enabled I'm not sure if there is way to check it through ASP.NET, a simple javascript does it..

      .....

      1 Reply Last reply
      0
      • A Ashish Kumar Vyas

        Hi, I am using code behind aspx.cs c#: if (Request.Browser.Cookies) lblBrowser.Text = "<b>Cookie Enabled</b>"; else lblBrowser.Text = "<b>Cookie Disabled</b>"; Problem: -I am using IE7 and from tools>Internet Option>privacy -I am selecting Block All Cookies -when again I am tring to run my code it showing cookie Eanbled. Can U solve this problem or give me some relative code. Thanks Ashish

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        The only way to check if a cookie is allowed, is to set it, and then on the next page check if you got it back from the browser.

        Despite everything, the person most likely to be fooling you next is yourself.

        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