Culture

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top