Tag Archives: ASP.NET
Web Api Routing for multiple Get methods in ASP.NET MVC 4 – Stack Overflow
Google Charts API Using Database in ASP.Net
Multiple Models in a View in ASP.NET MVC 4 / MVC 5 – CodeProject
Getting Started with Entity Framework 6 Database First using MVC 5 | The ASP.NET Site
Getting started with ASP.NET WebAPI. Why we need it ? – Curah!
Deploy a Secure ASP.NET MVC app with Membership, OAuth, and SQL Database to an Azure Web Site
How to create 3 tier application in Asp.Net C# to Insert,edit,update,bind and delete data | Asp.Net, C#.Net,VB.Net,MVC,jQuery, JavaScipt,AJAX,WCF,Sql Server example
How to set culture in web.config to change datetime format?
Error1: String was not recognized as a valid DateTime
Error2: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
How to fix it?
- Set culture in web.config (in system.web section)
In an ASP.NET Web page, you can set to two culture values, the Culture and UICulture properties. The Culture value determines the results of culture-dependent functions, such as the date, number, and currency formatting, and so on. The UICulture value determines which resources are loaded for the page.
Solution
add a globalization section to the Web.config file, and then set the uiculture and culture attributes, as shown in the following example:
<globalization uiCulture=»el-GR» culture=»el-GR» />
Culture list:
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo%28v=vs.80%29.aspx
