Archive

Archive for July, 2010

Simple Gzip / Deflate in .Net

July 29, 2010 1 comment

As promised this blog post is going to be a really short one. It’s just a quick win to enable your web forms or MVC application to utilise Gzip / Deflate compression and thus speed up the users experience of your web-site.

Why do this?

If a page takes a while to download, many visitors will simply click elsewhere.

Some of the advantages of compression:

  • Better experience for the user, better user retention
  • Reduces your bandwidth and hosting costs
  • Faster loading for slower connections

But as you are reading this post, I’m guessing you already know all this and more so lets get on with the code. Read more…

Categories: Code Examples Tags: , , ,

Minify, Combine CSS and JavaScript with Visual Studio

July 22, 2010 5 comments

One of my personal favourites and easy to achieve page speed improvements, is to Minify and Combine CSS and JavaScript files upon building the release code.

Not everyone has continuous integration (CI) setup and able perform Combine and Minify actions after committing your code to a build agents; so I hope this will help a few people that are running locally or even with build agents. Read more…

.NET MVC, Upload a CSV file to Database with Bulk upload

July 20, 2010 8 comments

Simple yet useful tool set to have is dealing with CSV (Comma-separated values), often as not you end having to filter CSV files and then push them in to a database of some kind.

I thought I’d give a quick example of taking a CSV file, building a data table in memory and the pushing all the data to MS SQL Server in one action.

The following is by no means a finish code or ready for production, but here goes.  Read more…

Categories: Code Examples Tags: , , ,
Follow

Get every new post delivered to your Inbox.

Join 324 other followers