473,387 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CurrentCulture, CurrentUICulture and Threads

Hi,

I have an asp.net page that uses a component in my business tier, which in
turn uses a component in my data tier. The business and data tiers are in
separate assemblies. I set Thread.CurrentThread.CurrentCulture and
Thread.CurrentThread.CurrentUICulture in the .aspx page.

The asp.net app, business tier, and data tier each have their own resource
files.

Are the business/data tier components guaranteed to execute on the same
thread as the .aspx page so that I can use
Thread.CurrentThread.CurrentCulture/Thread.CurrentThread.CurrentUICulture
from within the business/data tiers? Or should I pass a CultureInfo object
through the tiers?

I don't want the business tier to return a French message when the .aspx
page is in English.

Thanks.
Nov 18 '05 #1
1 1727
Yes, a page request is always handled by the same thread from start to
finish..unless ur doing odd threading stuff in your own code...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"DZoid" <me@nospam.com> wrote in message
news:W_********************@news20.bellglobal.com. ..
Hi,

I have an asp.net page that uses a component in my business tier, which in
turn uses a component in my data tier. The business and data tiers are in
separate assemblies. I set Thread.CurrentThread.CurrentCulture and
Thread.CurrentThread.CurrentUICulture in the .aspx page.

The asp.net app, business tier, and data tier each have their own resource
files.

Are the business/data tier components guaranteed to execute on the same
thread as the .aspx page so that I can use
Thread.CurrentThread.CurrentCulture/Thread.CurrentThread.CurrentUICulture
from within the business/data tiers? Or should I pass a CultureInfo object
through the tiers?

I don't want the business tier to return a French message when the .aspx
page is in English.

Thanks.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ken | last post by:
Hello, I am trying to learn how to build a localizable windows application and am having trouble getting alternate languages to display when if stop hardcoding the culture settings. The line...
0
by: Per Clausen | last post by:
Hello, Is it possible to change the Thread.CurrentThread.CurrentUICulture globally so that all threads etc. will use the same culture? We have a multi-language application where we use...
12
by: magister | last post by:
Hello, I know I can set the Culture to what I want, but shouldn't the current culture be taken from the regional settings on the web server's control panel!!! Mine is set to "united kingdom"...
5
by: ra294 | last post by:
When I use the Now() Fucntion i my ASP.net application I get a date format of mm/dd/yy. I want it to be dd/mm/yy. I set in the web config "culture="en-GB" uiCulture="en" and also set the regional...
3
by: Reny J Joseph Thuthikattu | last post by:
Hi, If i put a month callender on a asp.net web form and specify the culture on the page directive like '<%@ Page language="c#" Culture="ar-OM"%> it will display the Month callender in arabic. ...
4
by: Tedmond | last post by:
Dear all, My application allows users to switch languages at run time. I use the following code to change the UI Culture but all controls are remaining unchanged. ...
2
by: arne.wiklund | last post by:
Is there an error in the currentCulture.NumberFormat.NumberDecimalSeparator? Take a look at this code: Thread.CurrentThread.CurrentCulture = new CultureInfo("nb-NO");...
5
by: Tsair | last post by:
I set the thread culture in MAIN() as below in order to show the date in format DAY/MONTH/YEAR, but the datagridview alway show the date in M/d/yyyy. How to set the default Date format from...
1
by: =?Utf-8?B?SmVu?= | last post by:
I could get the correct System.Globalization.CultureInfo.CurrentCulture and System.Globalization.CultureInfo.CurrentUICulture when the my WPF application first started. While my application was...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.