Home > Net >  On the Formview data-bound controls problems shown in the short date format
On the Formview data-bound controls problems shown in the short date format

Time:12-25

The background approach to data binding, Formview desk & lt; ItemTemplate> First direct value date, the date on which the database field is the date type, very confusing, Eval (" birthday "). The ToString () display the web front end just behind the date with a "Monday 0:00:00", use the following methods, or show like this,


What should use the attribute set or other methods to solve this problem?

CodePudding user response:

Turn around, how didn't see you want to turn,
Write directly in the ToString format is ok, the hope that useful to you:
 
String s=DateTime. Now. ToString (" on dd MM yyyy years ");

CodePudding user response:

Datetime. ToString (" format ")
  • Related