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. not getting the cookie value in next page

not getting the cookie value in next page

Scheduled Pinned Locked Moved ASP.NET
2 Posts 2 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
    anbusenthil
    wrote on last edited by
    #1

    not getting the cookie value in next page in my first page i am assigning a cookie a value Protected Sub LnkEng1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LnkEng1.Click             Dim appCookie As New HttpCookie("lang")             Thread.CurrentThread.CurrentCulture = New CultureInfo("es-ES")             LoadStrings(Thread.CurrentThread.CurrentCulture)             Response.Cookies("lang").Value = Thread.CurrentThread.CurrentCulture.ToString             Response.Cookies.Add(appCookie)       End Sub ------------------------------------------------------ but in next pg i am not getting the value of the cookie If Request.Cookies("lang").Value Is Nothing Then                   Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")                   'get the culture info to set the language                   rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))                   ci = Thread.CurrentThread.CurrentCulture                   LoadStrings(ci)                      ElseIf Request.Cookies("lang").Value = "es-ES" Then                   Thread.CurrentThread.CurrentCulture = New CultureInfo("es-ES")                   'Request.Cookies("lang").Value = ci.ToString                   'Thread.CurrentThread.CurrentCulture = Session("lang")                   rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))                   ci = Thread.CurrentThread.CurrentCulture                   'ci = Thread.CurrentThread.CurrentCul

    V 1 Reply Last reply
    0
    • A anbusenthil

      not getting the cookie value in next page in my first page i am assigning a cookie a value Protected Sub LnkEng1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LnkEng1.Click             Dim appCookie As New HttpCookie("lang")             Thread.CurrentThread.CurrentCulture = New CultureInfo("es-ES")             LoadStrings(Thread.CurrentThread.CurrentCulture)             Response.Cookies("lang").Value = Thread.CurrentThread.CurrentCulture.ToString             Response.Cookies.Add(appCookie)       End Sub ------------------------------------------------------ but in next pg i am not getting the value of the cookie If Request.Cookies("lang").Value Is Nothing Then                   Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")                   'get the culture info to set the language                   rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))                   ci = Thread.CurrentThread.CurrentCulture                   LoadStrings(ci)                      ElseIf Request.Cookies("lang").Value = "es-ES" Then                   Thread.CurrentThread.CurrentCulture = New CultureInfo("es-ES")                   'Request.Cookies("lang").Value = ci.ToString                   'Thread.CurrentThread.CurrentCulture = Session("lang")                   rm = New ResourceManager("Resources.Strings", System.Reflection.Assembly.Load("App_GlobalResources"))                   ci = Thread.CurrentThread.CurrentCulture                   'ci = Thread.CurrentThread.CurrentCul

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Good Morning anbusenthil Why dont you use a Session ?

      Vuyiswa Maseko, Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers." C#/VB.NET/ASP.NET/SQL7/2000/2005/2008 http://www.vuyiswamaseko.somee.com http://www.vuyiswamaseko.tiyaneProperties.co.za vuyiswa@its.co.za http://www.itsabacus.co.za/itsabacus/

      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