Articles

0

Like

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

(http://idreesdotnet.blogspot.com/2018/02/c-set-datetime-required-format-for-each.html)
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: 254 | Categories: Visual Studio, MVC, C#, ASP.NET
Comments(0)

Post your comments

 

Other lins

.Net Techies
Other lins