Friday 23 March 2012

Display Flickr photos on .Net MVC web page

Functional Brief
I am working on a website for the Drumshanbo An Tostal Festival and one of the requirements was to show photos on the web site that the festival committee has stored on Flickr. I didn't want to just copy and paste a bunch of HTML onto the web page. I found that the existing web site they had was slow to load all of the Flickr images. What I really wanted to do was show a few photos and then provide a link to the full library of photos on Flickr.

Flickr allows you to add a set of photos as a PhotoSet. I wanted to get the last 5 PhotoSets from Flickr and display 7 photos from each set on the web page. The reason why I wanted 5 PhotoSets and 7 photos as that amount of photos fit in well with the size of the page space I wanted to fill.

Thursday 22 March 2012

C# Ternary Operator

Well I read about ternary operators the other day and wondered when I was going to get to use them.

The c# ternary operators replace the need for the if else statement. It's doing the same thing but it's certainly less typing involved and more condensed to look at.