S
shapper
Hello,
I need to define the culture of my web site based on a profile
property.
So I created a new class:
public class Config : Page {
protected override void InitializeCulture() {
base.InitializeCulture();
CultureInfo culture = default(CultureInfo);
culture = Profile.Get().Visitor.Culture;
if ((culture != null)) {
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
}
}
}
And inherit all pages from it.
But if all pages inherit from the same master page can't I just make
my new class Config inherit from Master page and the inherit my master
page from Config instead of all pages?
Could someone, please, advice me on this?
Thanks,
Miguel
I need to define the culture of my web site based on a profile
property.
So I created a new class:
public class Config : Page {
protected override void InitializeCulture() {
base.InitializeCulture();
CultureInfo culture = default(CultureInfo);
culture = Profile.Get().Visitor.Culture;
if ((culture != null)) {
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
}
}
}
And inherit all pages from it.
But if all pages inherit from the same master page can't I just make
my new class Config inherit from Master page and the inherit my master
page from Config instead of all pages?
Could someone, please, advice me on this?
Thanks,
Miguel