jQuery Date Picker

Although there’s a date picker present in HTML5 this won’t always work in older browsers and doesn’t look that great anyway so it’s generally better to do this via jQuery. First off add the following script tags to the head section of your page. <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js” type=”text/javascript”></script> <script src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js” type=”text/javascript”></script> Read more…

SQL Stored Procedure In .NET

I generally end up forgetting how to return results from a SQL stored procedure within .NET so I figured I’d put it here for reference. public static List<Blog> GetBlogSummaries() { List<Blog> blogs = new List<Blog>(); using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings[“BlogDatabase”].ConnectionString)) { using (SqlCommand command = new SqlCommand(“sp__get_blog_summaries”)) { command.CommandType Read more…

Basic HTML Code Snippets

This is essentially just based on Google prettify which can be found here. Just stick the following code in the head of the page to load the javascript. <script src=”https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js”></script> And then put the code you’d like to prettify in the following tags. <pre class=”prettyprint lang-html”></pre> If using this for Read more…