Asp.Net It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. Learn More, C# C# (pronounced "C-sharp") is an object-oriented programming language from Microsoft that aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java. Learn More, ASP.NET MVC The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication. The MVC framework is defined in the System.Web.Mvc assembly. Learn More,
string.Format in C# always returning error 'Input string was not in a correct format.'
Description:I have to format following string as mention in the following code.
It is not working because anything written within curly braces String.Format considers it as argument. So you should use double curly braces like {{ or }} so your code become
New Code
Your Previous Code
Cheers !
Replied by: sami hussain | Replied on: May 11, 2018