Last post Jan 28, 2009 05:59 AM by arefkarimi
Jan 28, 2009 04:34 AM|arefkarimi|LINK
I am developing a multi-language Asp.net application. I save the last culture the user has chosen in a cookie so that at next visits, I can activate that culture/language automatically. I save this information in UserName/CultureName pairs. For example if
the user Admin, uses FA-IR culture, I save Admin=FA-IR in the cookie. Unfortunately, each time I do this, I get the following error:
Can anyone help me please?
Jan 28, 2009 05:54 AM|F.B. ten Kate|LINK
It looks to me like you are trying to set admin=FA-IR as the culture, where you should try and set FA-IR (since that's a culture), basically you need to remove the admin= part of the string and you should get it working.
You can do this is several ways, one beeing stringVariable.Replace("admin=",''); (not a very neat one but the first that came to mind ^^)
Jan 28, 2009 05:59 AM|arefkarimi|LINK
Yes, I read Cookie.Value, which returned the cooki's whole body (Admin=Fa-ir) . Thanks alot