When it comes to handling datetime on SQL server it can get quite error prone when you are dealing with different regions and end up getting an out or range date exception if you are trying to add a date that is in EU date format to a server that is expecting a US date…
If you are using the sortable feature of the jQuery library, you will likely want a way to get the order of the elements. You can do this very easily using one of the built in events. The following code will obtain the element order for a sortable div and output the data to the…
Quite often when dealing with an API or some other external service, you will find that you get Unix timestamps returned to you or alternatively have to provide a timestamp in Unix form when sending a request back. Since you are going to be running your .NET code on a windows machine, you don't have…
There are various reasons that you might want to force a website to use SSL. In general, if you have an SSL cert setup for your website, you should probably force all users to https even if the page doesn't contain sensitive data. In an ideal world, you would do this on the server side…
You are looking to create some sort of HTML element on your site that when clicked will trigger a file download. Seems like a pretty simple request, but there is a little more to it then first appears. By default web browsers will have a set way to handle certain file formats. For example, if…
Classic ASP might seem like a language that is dead and gone, but it is still alive...somehow. With a language that has become outdated, it can be difficult to fight against modern security risks. Knowing how to prevent SQL injection with classic ASP is a valuable bit of code to have at your disposal. With…
When you have obtained a list of emails from a location that required little to no validation on whether it was a real email, you will be stuck trying to determine if the email address is real or not. You don't want to risk sending out an email to these users without checking as a…
  I recently hit an issue where i needed to change the name of an XML node. It ended up being a lot more complicated than I had expected it to be. node.Name is a read only field, so you can't take the simple route and rename it this way. Since you cannot rename the…
This tutorial will show you how to take┬áthe media manager from Wordpress and use it on an external page with a stock version of TinyMCE. I saw some posts about this and people were calling the Wordpress editor to achieve this. Its an option, but it is not what this guide is for. If you…
When pulling comments from a database table, it can be very costly when you are performing a query that will automatically sort all of the comments into the parent child hierarchy. Every extra ms your SQL server spends performing calculations is time that is wasted. If you can easily move this logic to the programming…