By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

ra***@hotmail.com
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ya Ya,

See this article on settig culture.

http://www.dotnetjunkies.com/Tutoria...3D2EDD38B.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

ra***@hotmail.com

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.