Hi,
I tested the following code with the BasePage code you provided:
Imports System.Threading
Partial Class TestCulture
Inherits BasePage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write("Current UI Culture : " & Thread.CurrentThread.CurrentUICulture.Name)
Response.Write("<br />")
Response.Write("Current Culture : " & Thread.CurrentThread.CurrentCulture.Name)
End Sub
End Class
And, found the following output, as desired:
Current UI Culture : fa-IR
Current Culture : fa-IR
And, I replaced the "Inherits BasePage" with "Inherits Page"
Imports System.Threading
Partial Class TestCulture
Inherits Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write("Current UI Culture : " & Thread.CurrentThread.CurrentUICulture.Name)
Response.Write("<br />")
Response.Write("Current Culture : " & Thread.CurrentThread.CurrentCulture.Name)
End Sub
End Class
And, following is the output (Default culture, in my machine):
Current UI Culture : en-US
Current Culture : en-US
So, it seems, your code is working :)
Am I missing something? Or, are you sure about the basepage
Negso.Common.BasePage
that you are inheriting in your Page is the correct BasePage that overrides the InitializeCulture() method?