G
Guest
User chooses language in which he wishes to continue, this is stored in a
cookie
(so next time he comes back he doenn't have to choose his lang again)
on every page I have a user control with three linkbuttons where he can
change the lang in which he works
so the value of the cookie should be changed
but after PostBack, I still get the old value...
//Code of Main page
Page_Load(object sender, System.EventArgs e){
string vLang = fCookieLang();
//rest of code...
}
public string fCookieLang()
{
HttpCookie cookie = Request.Cookies["LANG"];
if(null == cookie){
return null;
}else{
return cookie.Value.ToString();
}
}
//code of linkbutton
HttpCookie cookie = Request.Cookies.Get("LANG");
cookie.Value = "NL";
anybody knwos what's happening?
cookie
(so next time he comes back he doenn't have to choose his lang again)
on every page I have a user control with three linkbuttons where he can
change the lang in which he works
so the value of the cookie should be changed
but after PostBack, I still get the old value...
//Code of Main page
Page_Load(object sender, System.EventArgs e){
string vLang = fCookieLang();
//rest of code...
}
public string fCookieLang()
{
HttpCookie cookie = Request.Cookies["LANG"];
if(null == cookie){
return null;
}else{
return cookie.Value.ToString();
}
}
//code of linkbutton
HttpCookie cookie = Request.Cookies.Get("LANG");
cookie.Value = "NL";
anybody knwos what's happening?