Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1072171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:49:08+00:00 2026-05-16T20:49:08+00:00

If I set Thread Culture and UICulture for one ASPX, after pass for that

  • 0

If I set Thread Culture and UICulture for one ASPX, after pass for that page, all my aspx that use the same thread(not same request) will have the same Culture?

Because I need to set Culture just for one ASMX

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T20:49:09+00:00Added an answer on May 16, 2026 at 8:49 pm

    If the culture you set is not read from the browser settings (like it lives in a database) You need to set this on every request.

    As described here:
    http://msdn.microsoft.com/en-us/library/bz9tc508.aspx

    Override the page’s ‘InitializeCulture’ method on every page. A common base class for all your pages comes in really handy here.

    I would suggest firing up .NET reflector and see what the default implementation does. It will help clarify what is going on by default.

    As this is event is handled on the page level, and not in the Global.asax, I would expect this is re-set. also, as the article describes, this event is Called so early in the page life cycle that capturing User Input requires directly accessing ‘Request.Form’.

    EDIT: Please try this and See that this must be set in every request. Let me know if you see different results or if I misunderstand your question.

    Default.aspx: prints ‘21.09.2010’

    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="System.Threading" %>
    <%@ Import Namespace="System.Globalization" %>
    
    <script runat="server">
    protected override void InitializeCulture()
            {
                UICulture = "de-DE";
                Culture = "de-DE";
                //base.InitializeCulture();
            }   
    </script>
    <HTML>
    <head>
    </head>
    <body>
    <%= System.DateTime.Now.ToShortDateString()%>
    </body>
    </HTML>
    

    Default2.aspx: prints ‘9/21/2010’ (my default cluture is es-US)

    <%@ Page Language="C#" %>
    <HTML>
    <head>
    </head>
    <body>
    <%= System.DateTime.Now.ToShortDateString()%>
    </body>
    </HTML>
    

    The order in which you hit these pages does not matter. The results do not change.

    One approach people is used is to store this info in a Session variable and use the Session Variables to set the culture ..so logic for this is centerlized.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An asp:RangeValidator takes it's culture info from the page/ thread and all advice online
I set up a website to use SqlMembershipProvider as written on this page .
I'm creating a windows service that runs multiple threads. Can I set the culture
I'm trying to set up another thread that currently checks the status of the
Question title is basically the entire question. In ASP.NET you can set the Culture/UICulture
Is there some additional configuration needed before I can set thread priorities in a
In C#, how do I set the Identity of a Thread? For example, if
I have a Perl script that I'm attempting to set up using Perl Threads
I set up 404 handler page in web.config, but it works ONLY when extension
Foo* set = new Foo[100]; // ... delete [] set; You don't pass the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.