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 6648929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:42:49+00:00 2026-05-26T00:42:49+00:00

Im coding an ASP.NET MVC app on a spanish machine, so my date is

  • 0

Im coding an ASP.NET MVC app on a spanish machine, so my date is (dd/mm/yyyy).

But my remote vps use an en-US W2k8 so when I create a date in that machine it will be (mm/dd/yyyy)

Im not sure what is the correct way to resolve that.

I have a register form that take a string of type (dd/mm/yyyy) and send it to the controller. I guess that the model binder create a new DateTime that will be sent to the controller because if I insert (on remote) something like 31/10/2011 it says that the date is not correct, so when the model binder try to create the DateTime it cry.

So I need a way to specify (I guess that will be something global) that all my dates will be dd/mm/yyyy. So when the model binder create a new date, it will use that format.

How I do that? I think that it will be problematic on a future because I want to localize my app on english too and the english users will use mm/dd/yyyy.

  • 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-26T00:42:50+00:00Added an answer on May 26, 2026 at 12:42 am

    I don’t really have any experience with MVC3, but on a high level your problem is pretty trivial.
    Your current thread culture needs to match the one on the client side before request is bound to the model object. There are different ways to do it, but most obvious are:

    1) split application into top level culture subfolders. I.e. turn your /my_url/ into /en/my_url/, /sp/my_url/ etc. Throw a Web.config into each with relevant culture setting.
    This is probably more work than you care to put into it.

    2) post culture info with the form data and intercept it before binding. I am sure there is some kind of event you can handle before your controller action is executed. You can throw there a 1-liner to set the current thread culture depending on the post parameter.

    There is probably a way to combine these two based on request mapping. Something along the lines of /{language}/my_url/. Like I said I don’t really use MS version of the MVC design pattern enough to know the technical details of it.

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

Sidebar

Related Questions

I'm trying to use sub-domains in my ASP.NET website but I'm coming across a
I have an ASP.Net MVC app, and i have some xsl files inside of
In my asp.net mvc 2 app, I'm wondering about the best way to implement
ASP.NET MVC app, close to completion, then it was decided that it needed a
In my web app (ASP.NET MVC), I send an email using the following: MailMessage
I have an experience with CakePHP and now started coding on ASP.NET MVC framework.
If I'm coding in a View in Asp.net MVC and I want to get
I am trying to learn ASP.NET MVC by porting my current app written in
I have a simple ASP.NET MVC 3 dummy app (just learning MVC coming from
When coding up Ajax calls in ASP.Net MVC we have a lot of options

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.