S
Shapper
Hello,
On a Session_Start I want to do this:
1. GET "culture" value of a cookie named MyCookie.
NOTE: MyCookie can hold many values.
2. IF MyCookie doesn't exist OR "culture" value doesn't exist THEN
Do Nothing
IF MyCookie exist AND "culture" value exists THEN
Session("culture") = MyCookie("culture")
AND
Change Current Culture (set my web.config) to MyCookie("culture")
I created the following code in Global.asax but it gives me a lot of
errors.
Can someone help me with this?
Sub Session_Start(Sender As Object, E As EventArgs)
Dim MyCookie As HttpCookie = Request.Cookies("MyCookie")
If MyCookie.Values("culture") <> Null
Session("culture") = MyCookie.Values("culture")
Thread.CurrentThread.CurrentCulture = MyCookie.Values("culture")
End If
End Sub
Thank You,
Miguel
On a Session_Start I want to do this:
1. GET "culture" value of a cookie named MyCookie.
NOTE: MyCookie can hold many values.
2. IF MyCookie doesn't exist OR "culture" value doesn't exist THEN
Do Nothing
IF MyCookie exist AND "culture" value exists THEN
Session("culture") = MyCookie("culture")
AND
Change Current Culture (set my web.config) to MyCookie("culture")
I created the following code in Global.asax but it gives me a lot of
errors.
Can someone help me with this?
Sub Session_Start(Sender As Object, E As EventArgs)
Dim MyCookie As HttpCookie = Request.Cookies("MyCookie")
If MyCookie.Values("culture") <> Null
Session("culture") = MyCookie.Values("culture")
Thread.CurrentThread.CurrentCulture = MyCookie.Values("culture")
End If
End Sub
Thank You,
Miguel