Last post Sep 04, 2014 06:08 AM by AidyF
Sep 04, 2014 05:52 AM|ssvikramuk|LINK
Could you please help me with the beow issue.
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'string.ToString(System.IFormatProvider)' has some invalid arguments
Line 50: <div class="blog-meta">
Line 51: <span class="date" style="padding:0">@verticaltab.datenews.ToString("dd")</span>
Sep 04, 2014 06:08 AM|AidyF|LINK
"datenews" will be a string, so there isn't a ToString on the string class that accepts something like "dd". For your code to work "datenews" will have to be of type DateTime. Either change the type, or get whatever populates datenews from a DateTime to
do the ToString("dd") when it sets the model's value. You're probably better changing the type though.