Monthly Archives: June 2016

C# extension method to check if a string matches any string in given list


Posted in C#.Net | Tagged , , , , , | Leave a comment

Trigger window.resize event via javascript

2016-06-15 Use below code to trigger window.resize event. This can be helpful to refresh some libraries like Chartist.js when a panel  or a div the control is contained in is expanded. P.S. The above method isn’t supported by Internet explorer (failed on … Continue reading

Posted in Javascript | Tagged , , , | Leave a comment

Preserving milliseconds when passing dates around front end

2016-06-08 Instead of passing the datetime pass the datetime.Ticks which is a (long) numeric value so the complete datetime value will be preserved. Then convert ticks back to datetime in the server (controller \ action method).

Posted in ASP.Net, ASP.NET MVC, C#.Net, Web Development | Tagged , , , | Leave a comment

JavaScript Null Coalesce

2016-06-07 Use || similar to ?? in C# example (mvc)

Posted in Javascript | Tagged , | Leave a comment