473,320 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Where culture?

Hi,

where should I give Culture="..." that ALL my pages have the same?
I dont want to paste it in every aspx file :).

Thanks!

--
Best regards,
Odwrotnie.
Aug 5 '06 #1
5 972
This article will walk you through it:
http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

"odwrotnie" wrote:
Hi,

where should I give Culture="..." that ALL my pages have the same?
I dont want to paste it in every aspx file :).

Thanks!

--
Best regards,
Odwrotnie.
Aug 5 '06 #2
First of all you have to override InitializeCulture as show in the article
with link posted by Neverlyn

But you need to do that for all pages, well I suggest that you made a class
name it BasePage or whatever, this class should inherit from
System.Web.UI.Page.
Override your InitializeCulture on it.
Now make all your pages inherits from BasePage, or the pages that really
need this feature.

This has lots of other benifits.

Regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"odwrotnie" wrote:
Hi,

where should I give Culture="..." that ALL my pages have the same?
I dont want to paste it in every aspx file :).

Thanks!

--
Best regards,
Odwrotnie.
Aug 5 '06 #3
And of course you can set your default culture in web.config as well
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"odwrotnie" wrote:
Hi,

where should I give Culture="..." that ALL my pages have the same?
I dont want to paste it in every aspx file :).

Thanks!

--
Best regards,
Odwrotnie.
Aug 5 '06 #4
On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
<Mu**********@discussions.microsoft.comwrote:
Now make all your pages inherits from BasePage, or the pages that really
need this feature.
Could You please tell me how?

--
Best regards,
Odwrotnie.
Aug 8 '06 #5
Create A BasePage Class
public class BasePage : System.Web.UI.Page
{
protected override void InitializeCulture()
{
//Method Implementation as mentioned in the article
}
}
You can also reveiw this article :
http://www.c-sharpcorner.com/UploadF...b-1c68b05eb2e1

Now you have several pages, for example Products.aspx
now in your code behind make your Product Class inherits from BasePage as
the following:
public class Product: BasePage
{
//..normal coding
}

Also checkout this in your local MSDN
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_aspnetcon/html/76091f86-f967-4687-a40f-de87bd8cc9a0.htm

regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"odwrotnie" wrote:
On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
<Mu**********@discussions.microsoft.comwrote:
Now make all your pages inherits from BasePage, or the pages that really
need this feature.

Could You please tell me how?

--
Best regards,
Odwrotnie.
Aug 8 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JezB | last post by:
How do I programatically set the culture at session level ?
3
by: Ian O'Rourke | last post by:
Okay, I have a problem with the en-GB culture object My computer is set to the UK and for UK date formats, etc If I set my culture to en-GB in the web.config everything works fine with UK dates...
3
by: Shapper | last post by:
Hello, I am working on a multi-language web site. After a lot of searching and reading I was able to define a way to do this. However, I need some help to put this on. I am working on...
4
by: Henke | last post by:
Hi I'm building an globalized application (english, swedish and russian languages) and have a few questions: 1. In order to see the russian characters correct I have to set the requestEncoding...
1
by: Ken | last post by:
Hello, I am trying to learn how to build a localizable windows application and am having trouble getting alternate languages to display when if stop hardcoding the culture settings. The line...
9
by: Edge | last post by:
hi, I am saving the user selected culture in a session variable so I can apply it back to all pages when refreshed and then load the proper .resx values. For that I am using global.asax
0
by: mbowden | last post by:
I am trying to create a simple set of resource files for a dialog form that can display its button text in several langauges. I have: StandardButtonsText.resx StandardButtonsText.fr.resx...
6
by: Yofnik | last post by:
Hello, A C# desktop application is failing for an international customer because dates are being parsed incorrectly. I need to set the culture to "en-US" so the dates parse correctly. Is there any...
1
by: shapper | last post by:
Hello, I am initializing the culture of a page as follows: protected override void InitializeCulture() { base.InitializeCulture(); CultureInfo culture = Profile.Get().Visitor.Culture; if...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.