Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0 ASP.NET4.0
Hii,everyone
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 18:37pm
Comments
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".)
—SA
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.
—SA

1 solution

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

Solution 1

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

Hope this helps.Smile | :)
  Permalink  

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 718
1 OriginalGriff 450
2 CPallini 415
3 George Jonsson 231
4 Richard Deeming 145
0 OriginalGriff 5,450
1 CPallini 4,500
2 Sergey Alexandrovich Kryukov 4,032
3 George Jonsson 3,057
4 Gihan Liyanage 2,445


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2014
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