Click here to Skip to main content
11,492,523 members (59,064 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#4.0 ASP.NET4.0
When browsing page give me this error (Input string was not in a correct format.)
in this line of code

<h1><%# Eval("EntryDate","{0,D}") %></h1>
        <%# Eval("Entry") %>
Posted 22-Jan-13 19:37pm
Sergey Alexandrovich Kryukov at 23-Jan-13 0:47am
Please, show the definition of Eval(string) and Eval(string, string). Pat attention for string.Format and format itself. If you mean "{0,D}" to be a format specifier, it's wrong.
(Of course, this cannot be a JavaScript "eval".)
Sergey Alexandrovich Kryukov at 23-Jan-13 0:54am
Please pay attention for your abuse: I removed some of your "answers", for your own good. What you do is abuse and would be reported for abuse anyway. Some of your answers were further questions, or comments. This is explainable, but why would you even accept some formally? This is already classified as cheating.

As it was not really regular, I did not claim this abuse for abuse watch, but please understand: all cases of these kind abuse, when presented to consideration of members at abuse watch forum resulted in cancellation of accounts of systematic abusers. In your case, I hope it was just some mistake, so you won't do it after this warning.

Thank you for your understanding.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

 <%#Eval("EntryDate", "{0:MM/dd/yyyy}")%>

Hope this helps.Smile | :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 474
1 Maciej Los 276
2 F-ES Sitecore 224
3 KarstenK 210
4 CPallini 208
0 Sergey Alexandrovich Kryukov 10,062
1 OriginalGriff 8,620
2 Sascha Lefèvre 3,609
3 Maciej Los 3,372
4 Richard Deeming 2,500

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100