Your cart is currently empty!
Category: ASP.NET MVC
-
Simple way to sort dates in any format with jquery.datatables
Initially, I was formatting the date in my table using any format I liked. However, I soon realized that this would ruin sorting. For example, if you have a table with dates formatted as “dd/mm/yyyy” and “mm/dd/yyyy”, datatables will sort them incorrectly because it will sort them based on their underlying serial numbers. Then I…
-
Working with Null dates in DateRange Picker.
👋 Hey there! I recently worked on implementing a date range picker using the Daterangepicker plugin in my web application. It was a bit of a challenge at first, but I learned a lot from the experience. One of the main issues I encountered was how to handle null dates with moment.js library. I found…
-
File Audit with Entity Framework: Retrieve and Check Missing Files with Closest Modification Date
The FileAudit method is a useful way to retrieve file names from a database table and check if these files exist in a specified directory. With supporting methods like GetParent and GetClosestFile, it provides information about the missing files and the closest file based on the modification date. This article delves into the details of…
-
Adding session timeout to ASP.NET MVC 5
As part of security improvements, we needed to add a session time out in one of our apps. One of the challenges though is that users could be in the middle of submitting their work, go past the timer, then submit, and because their session has expired, they loose their work. Here is how we…
-
MVC 5 Dynamic redirect Uri for external OpenId authentication
If you are like me, you dont like having extra configuration in your web transforms. Originally I was setting the redirect uri statically from the web config using However, this means that we need a separate web config when we run locally vs when we run on the server. Also, the redirecturi is static. 😢…
-
Fixing MVC 5 Intellisense false errors (erroneous errors) 😢😣😖
This one really had me scratching my head. My error was looking similar to this stack overflow post – like this: The type ‘Expression<>’ is defined in an assembly that is not referenced Here is what worked for me… Locate the Web.Config in the root of your project (not the one in the views folder)…