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