Set culture for a DLL (class library) referenced from web application

Discussion in 'ASP .Net' started by Ya Ya, Nov 20, 2004.

  1. Ya Ya

    Ya Ya Guest

    I am developing a DLL (class library) for a web application of mine.

    In the web.config of the web application I have set: culture="en-GB"
    uiCulture="en" in order that the date format will be dd/mm/yyyy.

    I also changed the regional settings to that date format.

    When I am using the Now() function in the DLL I get the date format in
    mm/dd/yyyy instead. Why the date format in the DLL is different? Shouldn't
    it take the culture settings from the web application he is referenced from?

    How can I control the date format of the DLL (class library)?


    Thanks for your time

    Ya Ya, Nov 20, 2004
    #1
    1. Advertising

  2. RE: Set culture for a DLL (class library) referenced from web applicat

    Ya Ya,

    See this article on settig culture.

    http://www.dotnetjunkies.com/Tutorial/17E26271-E212-4248-965F-4B33D2EDD38B.dcik

    I don't believe you are setting the culture on the thread and the
    application assumes the culture of the server.

    HTH MikeL.

    "Ya Ya" wrote:

    > I am developing a DLL (class library) for a web application of mine.
    >
    > In the web.config of the web application I have set: culture="en-GB"
    > uiCulture="en" in order that the date format will be dd/mm/yyyy.
    >
    > I also changed the regional settings to that date format.
    >
    > When I am using the Now() function in the DLL I get the date format in
    > mm/dd/yyyy instead. Why the date format in the DLL is different? Shouldn't
    > it take the culture settings from the web application he is referenced from?
    >
    > How can I control the date format of the DLL (class library)?
    >
    >
    > Thanks for your time
    >
    >
    >
    >
    >
    =?Utf-8?B?TWlrZUw=?=, Nov 21, 2004
    #2
    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. Apogee

    Set Culture in Web.config

    Apogee, Jun 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,893
    Cosmin Marin
    Jun 7, 2004
  2. PJ
    Replies:
    1
    Views:
    548
    Girish bharadwaj
    Oct 6, 2004
  3. Rich
    Replies:
    5
    Views:
    814
    Juan T. Llibre
    Jan 24, 2005
  4. =?Utf-8?B?bWFuZ29tYW4=?=
    Replies:
    0
    Views:
    401
    =?Utf-8?B?bWFuZ29tYW4=?=
    Jan 1, 2007
  5. Ezmeralda
    Replies:
    1
    Views:
    802
    mlimber
    Apr 3, 2007
Loading...

Share This Page