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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    822
    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:
    804
    Mario Vargas
    Jul 17, 2003
  3. Manu
    Replies:
    1
    Views:
    6,436
    Natty Gur
    Jul 20, 2003
  4. Vidar Petursson

    Re: Javascript: date in culture/language format.

    Vidar Petursson, Aug 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    5,686
    Vidar Petursson
    Aug 15, 2003
  5. Mircea Pleteriu

    Crystal Reports Culture Info

    Mircea Pleteriu, Aug 28, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    981
    Mircea Pleteriu
    Aug 28, 2003
  6. Mike Prager

    Culture and Codepage question

    Mike Prager, Aug 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,592
    Mike Prager
    Aug 30, 2003
  7. Bogdan POPESCU

    Culture and validators

    Bogdan POPESCU, Oct 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,563
  8. Chris Porter

    timezone / culture weirdness

    Chris Porter, Oct 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    460
    Bret Mulvey [MS]
    Oct 25, 2003
Loading...