Where culture?

Discussion in 'ASP .Net' started by odwrotnie, Aug 5, 2006.

  1. odwrotnie

    odwrotnie Guest

    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.
    odwrotnie, Aug 5, 2006
    #1
    1. Advertising

  2. 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.
    >
    =?Utf-8?B?TmV2ZXJseW4=?=, Aug 5, 2006
    #2
    1. Advertising

  3. 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.
    >
    =?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=, Aug 5, 2006
    #3
  4. 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.
    >
    =?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=, Aug 5, 2006
    #4
  5. odwrotnie

    odwrotnie Guest

    On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
    <> wrote:

    > 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.
    odwrotnie, Aug 8, 2006
    #5
  6. 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


    "odwrotnie" wrote:

    > On Sun, 06 Aug 2006 00:54:02 +0200, Muhammad Mosa
    > <> wrote:
    >
    > > 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.
    >
    =?Utf-8?B?TXVoYW1tYWQgTW9zYQ==?=, Aug 9, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dejan Vesic
    Replies:
    1
    Views:
    668
    Chee Seong Ong
    Jul 3, 2003
  2. Aliasgar Pocketwala

    ASP.NET application wrong culture picked up

    Aliasgar Pocketwala, Jul 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    648
    Mario Vargas
    Jul 17, 2003
  3. Manu
    Replies:
    1
    Views:
    6,098
    Natty Gur
    Jul 20, 2003
  4. S. Justin Gengo

    Re: Differences between culture options

    S. Justin Gengo, Aug 8, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,434
    S. Justin Gengo
    Aug 8, 2003
  5. Vidar Petursson

    Re: Javascript: date in culture/language format.

    Vidar Petursson, Aug 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    5,499
    Vidar Petursson
    Aug 15, 2003
Loading...

Share This Page