I have a pretty standard .Net MVC Controller method:
public ActionResult Add(Customer cust) {
Where the customer is something like:
public class Customer { public DateTime DateOfBirth { get; set; }
And a page containing:
<div><%= Html.TextBox("DateOfBirth") %></div>
The problem is that my site is located on an American server, so cust.DateOfBirth is parsed in US format MM / dd / yyyy. However, I want users to enter the date of birth in the British dd / MM / yyyy format.
Can I change the default input format to DateTime ModelBinder or do I need to create my own custom ModelBinder?
c # asp.net-mvc
David Glenn Jul 14 '09 at 12:05 2009-07-14 12:05
source share