C# - Set DateTime required format for each request in ASP.NET MVC

Lets say we need to display and save date in yyyy/MM/dd format. Since our server default format is set to dd/MM/yyyy, and we could not change it because some other applications might get affected, so we decided to set the required format at request level in our ASP.Net MVC application. For this we have to set the date format for current culture for each request, i.e. inside Global.asax.cs, in Application_BeginRequest() event.
Posted by: Muhammad Idrees
On 25 Feb 2018 | Views: 278 | Categories: Visual Studio, MVC, C#, ASP.NET

Post your comments


Other lins

.Net Techies
Other lins