Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Culture

0 views
Skip to first unread message

shapper

unread,
Apr 15, 2008, 8:58:25 PM4/15/08
to
Hello,

I am working with VS 2008 and ASP.NET 3.5.

In my Web.Config file I have the following:

<globalization culture="pt-PT" uiCulture="pt-PT"/>

I suppose this sets the default culture of my web site.

All pages in my web site inherits from a master page named Base.

How can I, in Base.Master VB code, change the culture from the default
value to EN instead of changing in each page?

Thanks,
Miguel

Cowboy (Gregory A. Beamer)

unread,
Apr 16, 2008, 12:34:07 PM4/16/08
to

"shapper" <mdm...@gmail.com> wrote in message
news:34676756-f524-4f49...@24g2000hsh.googlegroups.com...

> Hello,
>
> I am working with VS 2008 and ASP.NET 3.5.
>
> In my Web.Config file I have the following:
>
> <globalization culture="pt-PT" uiCulture="pt-PT"/>
>
> I suppose this sets the default culture of my web site.

Yes. And it also states "no matter what the user wants, give him the default
language". Change to auto:pt-PT for both.

> All pages in my web site inherits from a master page named Base.
>
> How can I, in Base.Master VB code, change the culture from the default
> value to EN instead of changing in each page?

me.Page.UICulture = ""

me.Page.Culture = ""

And set the proper name. This can be done in any event.

If you also want to change theme, you will have to do it in OnPreInit in the
base class. I believe you also have to bury master page changes here, as
well.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************


0 new messages