Is it possible to display a DateTime value in dd/mm/yyyy format with the help of HTML Hepler methods in Asp.NET MVC? I tried to do this by using some formats in @Html.LabelFor and adding some annotations to the related property like below but it does not make any sense. Any help to solve this problem would be appreciated.
Now your text-box will accept "dd/MM/yyyy" format.
回答3:
I know this is an older question, but for reference, a really simple way for formatting dates without any data annotations or any other settings is as follows: