Click here to Skip to main content
12,072,809 members (72,423 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0 ASP.NET4
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 19:37pm
Comments
   
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
   
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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160208.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2016
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