Where culture?

  • Thread starter Thread starter odwrotnie
  • Start date Start date
O

odwrotnie

Hi,

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

Thanks!
 
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
 
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
 
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/Upload...rticleID=96602e53-0fb1-44ec-a67b-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 MSD
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
 

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

Similar Threads

Default Culture in VS2008? 6
Culture. What am I doing wrong? 1
web.config error 1
Culture 1
Keeping datetime culture invariant 2
ajax parsing error... 2
ReportViewer Control problem 0
Fail to preview CR 3

Back
Top