<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-8097474</id><updated>2009-11-05T20:42:19.258Z</updated><title type="text">IQODE Limited</title><subtitle type="html">ATTRACTIVE, INTUITIVE AND ACCESSIBLE WEBSITES, BUILT WITH WEB STANDARDS</subtitle><link rel="alternate" type="text/html" href="http://www.iqode.com/Blog/Browse/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.iqode.com/Feeds/atom.xml" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/iqode" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry><id>tag:blogger.com,1999:blog-8097474.post-3092090634049280707</id><published>2009-11-05T20:37:00.001Z</published><updated>2009-11-05T20:42:19.313Z</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Ext JS" /><title type="text">Ext JS 3.0 Cookbook</title><content type="html">&lt;p&gt;The good people at &lt;a title="Packt Publishing Website" href="http://www.packtpub.com/" class="external"&gt;Packt Publishing&lt;/a&gt; have sent me a complimentary copy of their latest Ext JS book - &lt;a class="external" title="Opens in a new window" href="http://www.packtpub.com/ext-js-3-0-cookbook/mid/291009bm6ofo?utm_source=iqode.com&amp;amp;utm_medium=affiliate&amp;amp;utm_content=blog&amp;amp;utm_campaign=mdb_001254"&gt;Ext JS 3.0 Cookbook&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;A brief look through indicates that it's very well laid out with clear and concise example code. I'd say it's appropriate for those already experienced in RIA development using Ext JS. &lt;/p&gt;  &lt;p&gt;I'm looking forward to publishing a much more detailed review of this book so watch this space.&lt;/p&gt;  &lt;p style="text-align: center" class="blogPic"&gt;&lt;a href="http://www.packtpub.com/ext-js-3-0-cookbook/mid/291009bm6ofo?utm_source=iqode.com&amp;amp;utm_medium=affiliate&amp;amp;utm_content=blog&amp;amp;utm_campaign=mdb_001254"&gt;&lt;img style="margin: 0px; display: inline" title="Ext JS 3.0 Cookbook" alt="Ext JS 3.0 Cookbook" src="http://lh5.ggpht.com/_0aDq5r1HHDk/SvM3ip_T7FI/AAAAAAAAFWo/2wih4gFCJAQ/Ext%20JS%203.0%20Cookbook%5B4%5D.jpg?imgmax=800" width="195" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-3092090634049280707?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/3092090634049280707/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=3092090634049280707&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/3092090634049280707" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/3092090634049280707" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/wI9uvLT6ooM/ext-js-30-cookbook.html" title="Ext JS 3.0 Cookbook" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/11/ext-js-30-cookbook.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-5052111984366027004</id><published>2009-09-01T14:15:00.001+01:00</published><updated>2009-09-01T14:15:11.764+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="News" /><title type="text">Full Frontal JavaScript Conference, Brighton 20th November 2009</title><content type="html">&lt;p&gt;Today was an interesting day. &lt;/p&gt;  &lt;h3&gt;Bad Times&lt;/h3&gt;  &lt;p&gt;This morning I learnt that my MacBook Pro disk drive had died a very comprehensive death the very second reboot I performed after installing Snow Leopard. The drive&amp;#160; is under warranty but hey, it's a pain. I've popped in an old 60gb drive. not really enough room to dual boot the blighter so I whacked on Windows 7 Pro until my replacement unit shows up. Snow Leopard will have to wait a little while longer.&lt;/p&gt;  &lt;h3&gt;Good Times&lt;/h3&gt;  &lt;p&gt;I won a free ticket to the &lt;a href="http://2009.full-frontal.org/"&gt;Full Frontal JavaScript Conference&lt;/a&gt; being organised by Remy Sharp at &lt;a href="http://leftlogic.com/"&gt;Left Logic&lt;/a&gt;. Aces! It's going to be a great conference with some very interesting speakers. There's still early bird tickets going so hurry up and get yours.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-5052111984366027004?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/5052111984366027004/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=5052111984366027004&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/5052111984366027004" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/5052111984366027004" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/BwLy1y-fogU/full-frontal-javascript-conference.html" title="Full Frontal JavaScript Conference, Brighton 20th November 2009" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/09/full-frontal-javascript-conference.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-6105002354194619685</id><published>2009-07-21T16:48:00.002+01:00</published><updated>2009-07-21T16:54:06.758+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Ext JS" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Linq" /><title type="text">Using Ext JS Grids with ASP.Net MVC - Basic Example</title><content type="html">&lt;p&gt;Following my post &lt;a href="http://www.iqode.com/Blog/Posts/2008/10/ext-js-jsonstore-and-linq-to-json-g"&gt;&amp;quot;Ext JS JsonStore and Linq to JSON Gotcha&amp;quot;&lt;/a&gt; I've had a few people asking for a more complete example of how to use Ext JS Grids and data stores (in particular the JsonStore) with ASP.Net MVC and LINQ to SQL. Since writing that blog post I've learnt a lot more about the ASP.Net MVC framework and the Ext JS framework so I thought it would be helpful to publish a complete working demo. So, here's an example that displays a simple Ext JS Grid populated from the Northwind database Products table. The example shows how to use an Ext JS Grid with a JsonStore that supports server side paging and sorting.&lt;/p&gt;  &lt;p&gt;&lt;a title="Download this example as a working Visual Studio 2008 MVC (Version 1.0) application" href="http://files.getdropbox.com/u/107371/Northwind%20ExtJS.zip"&gt;Download this example as a working Visual Studio 2008 MVC (Version 1.0) application&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Requirements&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="All about the ASP.Net MVC framework" href="http://www.asp.net/mvc/"&gt;ASP.Net MVC Version 1.0&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a title="How to download and learn the Ext JS 3.0 JavaScript framework" href="http://extjs.com/products/extjs/"&gt;Ext JS version 3.0&lt;/a&gt; (works with version 2.x also) - to keep things simple I'm using standalone Ext JS and ext-all.js library. &lt;/li&gt;    &lt;li&gt;&lt;a title="Excellent Scott gu post about obtaining and using the Dynamic LINQ Query  Library" href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx"&gt;Dynamic LINQ Query Library&lt;/a&gt; - to keep things simple I've included the source code in the project under App_Code &lt;/li&gt;    &lt;li&gt;&lt;a title="How to download and install the Northwind sample database" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&amp;amp;DisplayLang=en"&gt;Northwind sample Microsoft SQL Server database&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Overview&lt;/h3&gt;  &lt;p&gt;So take a look at the code. It's very simple and straightforward! Here's what you should see when you run the project.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_0aDq5r1HHDk/SmXjOGt13LI/AAAAAAAAEWE/PNQAdqASdhQ/s1600-h/MVC_ExtJS_Grid%5B3%5D.png"&gt;&lt;img class="blogPic" title="MVC ExtJS Grid screen shot" border="0" alt="MVC ExtJS Grid screen shot" src="http://lh6.ggpht.com/_0aDq5r1HHDk/SmXjOvC-5BI/AAAAAAAAEWI/f9xAzdOG2ag/MVC_ExtJS_Grid_thumb%5B1%5D.png?imgmax=800" width="400" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In brief the Index action method of the Products controller handles a vanilla HTTP GET request for the Products index page (/Products/). The view it returns is an almost empty page that simply exposes an element that we can render the Ext JS GridPanel to. &lt;/p&gt;  &lt;p&gt;When the index page loads, the load event creates the Ext JS components needed including the JsonStore. It then renders the grid and loads the data store thus triggering an AJAX request to the same URL (this time as a POST, which is the only method supported by the JsonStore component). A different Index action method in the controller handles the POST and if it's an Ajax request it pulls the products from the database and returns JSON in a format expected by the JsonStore. &lt;/p&gt;  &lt;pre class="csharpcode"&gt;[AcceptVerbs(HttpVerbs.Post)] 
&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Index(&lt;span class="kwrd"&gt;int&lt;/span&gt; Skip, &lt;span class="kwrd"&gt;int&lt;/span&gt; Take, &lt;span class="kwrd"&gt;string&lt;/span&gt; SortDir, &lt;span class="kwrd"&gt;string&lt;/span&gt; Sort) 
{ 
  &lt;span class="kwrd"&gt;if&lt;/span&gt; (Request.IsAjaxRequest()) 
  { 
    var products = productsRepository.GetAllProducts(); 

    var results = (&lt;span class="kwrd"&gt;new&lt;/span&gt; 
    { 
      totalRecords = products.Count(), 
      products = products.OrderBy(Sort + &lt;span class="str"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + SortDir).Skip(Skip).Take(Take) 
    }); 

    &lt;span class="kwrd"&gt;return&lt;/span&gt; Json(results); 
  } 
  &lt;span class="kwrd"&gt;else&lt;/span&gt; 
  { 
    &lt;span class="kwrd"&gt;return&lt;/span&gt; RedirectToAction(&lt;span class="str"&gt;&amp;quot;Index&amp;quot;&lt;/span&gt;); 
  } 
}&lt;/pre&gt;

&lt;h3&gt;Some Points of Interest&lt;/h3&gt;

&lt;p&gt;Where I define the JsonStore component in the ext-lib.js file you will notice I have re-defined the default paging parameter names to match my own code behind. Also notice I am redefining some JsonReader parameters (totalProperty and root) to match the JSON data returned by the controller action method. These steps aren't strictly necessary for this example but I have included it for reference. Alternatively you could use the default Ext JS parameter names and ensure your c# code matches.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;Northwind.ProductStore = function(config) {
    Northwind.ProductStore.superclass.constructor.call(&lt;span class="kwrd"&gt;this&lt;/span&gt;, Ext.apply({
        paramNames: {
            &lt;span class="str"&gt;&amp;quot;start&amp;quot;&lt;/span&gt;: &lt;span class="str"&gt;&amp;quot;Skip&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;limit&amp;quot;&lt;/span&gt;: &lt;span class="str"&gt;&amp;quot;Take&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;sort&amp;quot;&lt;/span&gt;: &lt;span class="str"&gt;&amp;quot;Sort&amp;quot;&lt;/span&gt;,
            &lt;span class="str"&gt;&amp;quot;dir&amp;quot;&lt;/span&gt;: &lt;span class="str"&gt;&amp;quot;SortDir&amp;quot;&lt;/span&gt;
        },
        totalProperty: &lt;span class="str"&gt;'totalRecords'&lt;/span&gt;,
        root: &lt;span class="str"&gt;'products'&lt;/span&gt;,
        remoteSort: &lt;span class="kwrd"&gt;true&lt;/span&gt;,
        autoLoad: &lt;span class="kwrd"&gt;false&lt;/span&gt;,
        id: &lt;span class="str"&gt;&amp;quot;ProductID&amp;quot;&lt;/span&gt;,
        method: &lt;span class="str"&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;
    }, config));
};&lt;/pre&gt;

&lt;p&gt;The config parameter of the ProductStore constructor above is used to allow us to pass in additional, or override the existing, configuration parameters of the component.&amp;#160; &lt;/p&gt;

&lt;p&gt;Also in ext-lib.js file you will notice a column renderer method. This is a helper function called during&amp;#160; grid rendering to format the data in certain columns. When the columns are specified in the ProductColumnModel you will see I have configured the Stock column to use the stockRenderer method to render the column data. &lt;/p&gt;

&lt;p&gt;The stockRenderer method shows how you can reference the data row currently being rendered by the grid and manipulate the HTML rendered in the grid cell. Here I simply add a style to any products that have a stock level less than the reorder level and that are also discontinued.&lt;/p&gt;

&lt;p&gt;The column renderer for the Price column uses a built in formatter to render the data as a currency.&lt;/p&gt;

&lt;p&gt;The Discontinued column uses a special Ext JS column type to render the boolean value.&lt;/p&gt;

&lt;h3&gt;Summary&lt;/h3&gt;

&lt;p&gt;Well, I hope you have found this interesting and helpful. I'm hoping to expand on some of the concepts here and provide examples of some more advanced capabilities and features I have implemented using the ASP.Net MVC and Ext JS frameworks.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-6105002354194619685?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/6105002354194619685/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=6105002354194619685&amp;isPopup=true" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/6105002354194619685" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/6105002354194619685" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/nK8F4PcWeIU/using-ext-js-grids-with-aspnet-mvc.html" title="Using Ext JS Grids with ASP.Net MVC - Basic Example" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/07/using-ext-js-grids-with-aspnet-mvc.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-6634680050161082981</id><published>2009-06-18T15:21:00.003+01:00</published><updated>2009-07-16T16:42:46.146+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="News" /><title type="text">Recent Projects Completed by Iqode</title><content type="html">&lt;p&gt;Things have been pretty busy here at Iqode hence the lack of updates to this site. Here's a quick run down of some of the major projects I've been involved in. You can find out a little more by checking out my &lt;a title="Portfolio" href="/portfolio/"&gt;portfolio&lt;/a&gt;.&lt;/p&gt;  &lt;h2&gt;Nickelodeon&lt;/h2&gt;  &lt;p&gt;Iqode's work at Nickelodeon was extended a few more months after the Christmas rush to help roll out further updates to both the Nick Jr and Nick sites. Updates included micro-sites for St. Valentine's day, Easter and schools half-term. All big events in the world of children's broadcasting! Also some brand new programmes were launched for spring which also needed supporting micro-sites:&lt;/p&gt;  &lt;h3&gt;Nick Jr&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a class="external" title="Nick Jr: Ben &amp;amp; Holly&amp;#39;s Little Kingdom" href="http://www.nickjr.co.uk/shows/littlekingdom/"&gt;Ben &amp;amp; Holly's Little Kingdom&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a class="external" title="Nick Jr: Roary the Racing Car" href="http://www.nickjr.co.uk/shows/roary/"&gt;Roary the Racing Car&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a class="external" title="Nick Jr: Humf micro-site" href="http://www.nickjr.co.uk/shows/humf/"&gt;Humf&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Nick&lt;/h3&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a class="external" title="Nick: See Something Say Something" href="http://microsites.nick.co.uk/saysomething/"&gt;See Something Say Something&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a class="external" title="Nick: The Elephant Princess" href="http://microsites.nick.co.uk/elephantprincess/"&gt;The Elephant Princess&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If that wasn't enough Nickelodeon are promoting a global celebration of ten years of SpongeBob SquarePants this year. Iqode was responsible for building the UK &lt;a class="external" title="Nick: SpongeBob SquarePants Portal" href="http://microsites.nick.co.uk/spongebob/"&gt;SpongeBob SquarePants portal&lt;/a&gt; featuring games, clips, bio's and downloads. That was a lot of fun.&lt;/p&gt;  &lt;p&gt;Please be aware Iqode didn't produce any of the artwork for these sites. However, Iqode worked closely with Nickelodeon designers to develop nice clean interfaces created with love using the finest inorganic ingredients sprinkled with XHTML, CSS and underpinned with some solid, tasty ASP.Net code. &lt;/p&gt;  &lt;h2&gt;St Andrew's Healthcare&lt;/h2&gt;  &lt;p&gt;St Andrew's is the UK's largest not-for-profit mental health care charity that specialises in mental health care, learning disabilities and acquired brain injuries.&lt;/p&gt;  &lt;p&gt;A consortium of three companies built NENE - St Andrew's core nursing resource allocation application. &lt;/p&gt;  &lt;p&gt;&lt;a class="external" title="Devour Design Limited" href="http://www.devourdesign.co.uk/"&gt;Devour Design Limited&lt;/a&gt; designed the front-end and managed the project.&lt;/p&gt;  &lt;p&gt;&lt;a class="external" title="Simego Limited" href="http://www.simego.com/"&gt;Simego Limited&lt;/a&gt; developed the Microsoft SQL Server database and wrote some excellent data import tools to provide seamless integration with St Andrew's human resource databases.&lt;/p&gt;  &lt;p&gt;Iqode Limited developed the web application heavily utilizing some cool technologies and frameworks: AJAX, Ext JS, jQuery and ASP.Net MVC.&lt;/p&gt;  &lt;p&gt;This mission critical application tracks clinical and non-clinical staffing requirements across the entire organisation and allows users to assign temporary or permanent members of staff to those vacancies. &lt;/p&gt;  &lt;h2&gt;Study Group&lt;/h2&gt;  &lt;p&gt;Study Group helps over 40,000 international students every year to achieve academic success. The company spans five continents and has major learning centres in Australia and New Zealand, the USA and the United Kingdom.&lt;/p&gt;  &lt;p&gt;Study Group have developed a web-based application, called Partners, that allows their global network of agents to enrol students, book courses, accommodation and airport transfers.&lt;/p&gt;  &lt;p&gt;Before the Partners soft launch Iqode was asked to improve the user experience by refining the user interface and improving workflows and processes. Additionally I improved cross-browser compatibility and, where necessary, development new or missing functionality.&lt;/p&gt;  &lt;p&gt;The project was great fun and gave me the opportunity to work on an application that was beautifully architected and designed by some very talented developers. I know I learnt a lot from this project and I hope I was able to share some of my own expertise with the team in return.&lt;/p&gt;  &lt;p&gt;The Partners application is only available to authorised agents and there is no public access.&lt;/p&gt;  &lt;h2&gt;Matchbox Mobile&lt;/h2&gt;  &lt;p&gt;Matchbox Mobile provide unique mobile software solutions for the wireless industry. Matchbox asked Iqode to produce a working proof of concept web application to support a prototype mobile device application. The application mashes up Windows Live services with location based services to produce and amazing and unique experience for its users. I'm afraid NDA's prevent me from elaborating further so let me bore you with Iqode's role in this project!&lt;/p&gt;  &lt;p&gt;From page mock-ups and wire frames provided by the client Iqode produced an ASP.Net MVC application that was brought to life with a smattering of jQuery Ajaxified magic. Behind the scenes the application connected to Windows Live web services for &lt;abbre title="Personal Information Management"&gt;PIM&lt;/abbr&gt; (Calendar, Appointments and Contact management) and SQL Server 2005 for PIM caching, user membership and profile management.&lt;/p&gt;  &lt;p&gt;As soon as this software comes out of private beta I'll publish more information.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-6634680050161082981?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/6634680050161082981/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=6634680050161082981&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/6634680050161082981" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/6634680050161082981" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/wb8FHgOQrZk/recent-projects-completed-by-iqode.html" title="Recent Projects Completed by Iqode" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/06/recent-projects-completed-by-iqode.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-7967695191873531875</id><published>2009-06-01T19:42:00.001+01:00</published><updated>2009-06-19T16:11:53.055+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gotcha" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Telerik" /><title type="text">Telerik RadAjaxmanager and IE Conditional Comments Gotcha</title><content type="html">&lt;p&gt;Recently I was working on a project that extensively used &lt;a title="Telerik RadControls for ASP.Net AJAX" href="http://www.telerik.com/products/aspnet-ajax.aspx" class="external"&gt;Telerik RadControls for ASP.Net AJAX&lt;/a&gt; and we were experiencing some Internet Explorer CSS rendering weirdness across versions 6,7 and 8 whenever an AJAX call was made. My immediate thought was the usual IE float clearing bug, a double margin bug or, let's be honest, one of any number of &lt;a title="The weird and wonderful world of Internet Explorer" href="http://www.positioniseverything.net/explorer.html" class="external"&gt;irritating IE CSS bugs&lt;/a&gt; . The strange thing was each IE version exhibited slightly different rendering issues which, after some thought, made me think it was something else.&lt;/p&gt;  &lt;p&gt;After some rummaging around with the wonderful Firebug I noticed that &lt;em&gt;all&lt;/em&gt; of the style sheets within the IE conditional comments were being attached after each AJAX callback. So the style sheet for IE6 was being attached when viewed in IE7 and IE8 and so on. Hmmm.&lt;/p&gt;  &lt;p&gt;It seems that the RadAjaxManager doesn't handle IE conditional comments. After an Ajax request the RadAjaxManager attaches &lt;em&gt;all&lt;/em&gt; style sheets referenced within IE conditional comments mark-up and the CSS is applied. &lt;/p&gt;  &lt;p&gt;Luckily there are &lt;a title="Telerik: How to use Css Conditional Comments with Ajax" href="http://www.telerik.com/help/aspnet-ajax/ajxconditionalcomments.html" class="external"&gt;some workarounds&lt;/a&gt; which we were able to use. In my case I was able to set the EnablePageHeadUpdate property to false so the head content was not updated for each Ajax callback.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-7967695191873531875?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/7967695191873531875/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=7967695191873531875&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7967695191873531875" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7967695191873531875" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/yR3sNuEdjio/telerik-radajaxmanager-and-ie.html" title="Telerik RadAjaxmanager and IE Conditional Comments Gotcha" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/06/telerik-radajaxmanager-and-ie.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-1781209428858542612</id><published>2009-05-14T20:11:00.004+01:00</published><updated>2009-06-19T16:07:02.531+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title type="text">For the last time. Panels Render Mark-up!</title><content type="html">&lt;p&gt;If I had a penny for each time I encounter this kind of mark-up in an ASP.Net Web Form...&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&amp;lt;asp:Panel runat=&lt;span class="str"&gt;"server"&lt;/span&gt; ID=&lt;span class="str"&gt;"PanelFooContainer"&lt;/span&gt; Visible=&lt;span class="str"&gt;"true"&lt;/span&gt;&amp;gt;
   &amp;lt;div id=&lt;span class="str"&gt;"FooContainer"&lt;/span&gt;&amp;gt;
       Foo bar baz
   &amp;lt;/div&amp;gt;
&amp;lt;/asp:Panel&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;...I'd be a few quid better off. I've also seen the following a few times which makes me feel a little unwell.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&amp;lt;table&amp;gt;
   &amp;lt;tr&amp;gt;
       &amp;lt;th&amp;gt;Foo&amp;lt;/th&amp;gt;
   &amp;lt;/tr&amp;gt;
   &amp;lt;asp:Panel runat=&lt;span class="str"&gt;"server"&lt;/span&gt; ID=&lt;span class="str"&gt;"PanelFooContainer"&lt;/span&gt; Visible=&lt;span class="str"&gt;"true"&lt;/span&gt;&amp;gt;
       &amp;lt;tr&amp;gt;
           &amp;lt;td&amp;gt;bar baz&amp;lt;/td&amp;gt;
       &amp;lt;/tr&amp;gt;
   &amp;lt;/asp:Panel&amp;gt;
&amp;lt;/table&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;What's wrong with this? Well, this mark-up renders the following HTML to the browser:&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;pre class="csharpcode"&gt;    &amp;lt;table&amp;gt;
       &amp;lt;tr&amp;gt;
           &amp;lt;th&amp;gt;Foo&amp;lt;/th&amp;gt;
       &amp;lt;/tr&amp;gt;
       &amp;lt;div id=&lt;span class="str"&gt;"PanelFooContainer"&lt;/span&gt;&amp;gt;
           &amp;lt;tr&amp;gt;
               &amp;lt;td&amp;gt;bar baz&amp;lt;/td&amp;gt;
           &amp;lt;/tr&amp;gt;
       &amp;lt;/div&amp;gt;
   &amp;lt;/table&amp;gt;&lt;/pre&gt;

&lt;p&gt;Which, I am sure you will agree, is a pigs ear. Oh, and it's invalid HTML.&lt;/p&gt;

&lt;p&gt;I'm sure most developers guilty of this do not intend to render that additional mark-up - they just want a control which they can show or hide easily from the code. But if all you require is a control that you can work with in your code then simply use a &lt;a title="MSDN: PlaceHolder Web Server Control" href="http://msdn.microsoft.com/en-us/library/tety77hf(VS.71).aspx" class="external"&gt;PlaceHolder control&lt;/a&gt; that doesn't render any superfluous mark-up.  &lt;/p&gt;

&lt;p&gt;Your mark-up will be valid, you will feel warm and cosy and your code will probably remain exactly the same. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-1781209428858542612?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/1781209428858542612/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=1781209428858542612&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/1781209428858542612" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/1781209428858542612" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/FGH2XM6XVMo/for-last-time-panels-render-mark-up.html" title="For the last time. Panels Render Mark-up!" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2009/05/for-last-time-panels-render-mark-up.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-7301674969948778057</id><published>2008-10-24T17:22:00.008+01:00</published><updated>2009-06-17T19:46:54.084+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Ext JS" /><category scheme="http://www.blogger.com/atom/ns#" term="Gotcha" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title type="text">Ext JS JsonStore and Linq to JSON Gotcha</title><content type="html">&lt;p&gt;
Here's a little gotcha that had be scratching my head for a moment. I was testing the Grid component of the excellent &lt;a href="http://extjs.com/products/extjs/" class="external"&gt;Ext JS framework&lt;/a&gt; when I ran into a problem loading the JSON result into the grid.
&lt;/p&gt;
&lt;p&gt;It seemed simple enough - populate the grid from JSON data returned by a controller action method. When I ran the code the grid wasn't populated: the Ext JSONReader was throwing an error "root is undefined". I checked and double checked everything but could not see what the problem was.&lt;/p&gt;
&lt;p&gt;Here's the JavaScript to create the JsonStore for the grid:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;
var ds = &lt;span class="kwrd"&gt;new&lt;/span&gt; Ext.data.JsonStore({
   url: &lt;span class="str"&gt;'/Home/GetData'&lt;/span&gt;,
   totalProperty: &lt;span class="str"&gt;'totalRecords'&lt;/span&gt;,
   root: &lt;span class="str"&gt;'requests'&lt;/span&gt;,
   id: &lt;span class="str"&gt;"ReqNo"&lt;/span&gt;,
   fields: [&lt;span class="str"&gt;'Division'&lt;/span&gt;, &lt;span class="str"&gt;'Department'&lt;/span&gt;],
   listeners: {
       loadexception: function(proxy, store, response, e) {
           alert(e.message);
       }
   }       
}); &lt;/pre&gt;
&lt;p&gt;Here's the controller method that returns the JSON:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; JsonResult GetData(&lt;span class="kwrd"&gt;int&lt;/span&gt;? start, &lt;span class="kwrd"&gt;int&lt;/span&gt;? limit)
{
   limit = limit ?? 25;
   start = start ?? 0;
 

   &lt;span class="kwrd"&gt;string&lt;/span&gt; dataPath = HttpContext.Server.MapPath(&lt;span class="str"&gt;"~/Data/TestData.xml"&lt;/span&gt;);
   XDocument xDoc = XDocument.Load(dataPath);
   var results = from requests &lt;span class="kwrd"&gt;in&lt;/span&gt; xDoc.Descendants(&lt;span class="str"&gt;"requests"&lt;/span&gt;)
                 select &lt;span class="kwrd"&gt;new&lt;/span&gt;
                 {
                     totalRecords = requests.Elements(&lt;span class="str"&gt;"request"&lt;/span&gt;).Count(),
                     requests = (from request &lt;span class="kwrd"&gt;in&lt;/span&gt; requests.Elements(&lt;span class="str"&gt;"request"&lt;/span&gt;)
                                 select &lt;span class="kwrd"&gt;new&lt;/span&gt; NBWeb.Models.Request
                                 {
                                     Division = request.Element(&lt;span class="str"&gt;"Division"&lt;/span&gt;).Value,
                                     Department = request.Element(&lt;span class="str"&gt;"Department"&lt;/span&gt;).Value
                                 }).Skip((&lt;span class="kwrd"&gt;int&lt;/span&gt;)start).Take((&lt;span class="kwrd"&gt;int&lt;/span&gt;)limit)
                 };
   &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Json(results);
}&lt;/pre&gt;
&lt;p&gt;And here's an example of the JSON it emits:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;
[{
   &lt;span class="str"&gt;"totalRecords"&lt;/span&gt;:200,
   &lt;span class="str"&gt;"requests"&lt;/span&gt;:[
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 1"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 5"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 2"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 4"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 3"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 5"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 4"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 6"&lt;/span&gt;,},
   ]
}]

&lt;/pre&gt;

&lt;p&gt;Eventually, upon examining the JSON for the tenth time, it dawned on me - the entire JSON data was nested in a redundant outer array. So the JsonStore root property was not being found - it was looking for:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;obj["requests"]&lt;/pre&gt;
&lt;p&gt;but would need to look for:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;obj[0]["requests"]&lt;/pre&gt;
&lt;p&gt;So it was the controller returning slightly malformed JSON. It's a bug in my code - I need to return the inner result of the Linq select rather than the entire result.  So I need to take the FirstOrDefault record from the results, like so:&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; JsonResult GetData(&lt;span class="kwrd"&gt;int&lt;/span&gt;? start, &lt;span class="kwrd"&gt;int&lt;/span&gt;? limit)
{
   limit = limit ?? 25;
   start = start ?? 0;

   &lt;span class="kwrd"&gt;string&lt;/span&gt; dataPath = HttpContext.Server.MapPath(&lt;span class="str"&gt;"~/Data/TestRequests2500.xml"&lt;/span&gt;);
   XDocument xDoc = XDocument.Load(dataPath);
   var results = (from requests &lt;span class="kwrd"&gt;in&lt;/span&gt; xDoc.Descendants(&lt;span class="str"&gt;"requests"&lt;/span&gt;)
                 select &lt;span class="kwrd"&gt;new&lt;/span&gt;
                 {
                     totalRecords = requests.Elements(&lt;span class="str"&gt;"request"&lt;/span&gt;).Count(),
                     requests = (from request &lt;span class="kwrd"&gt;in&lt;/span&gt; requests.Elements(&lt;span class="str"&gt;"request"&lt;/span&gt;)
                                 select &lt;span class="kwrd"&gt;new&lt;/span&gt; NBWeb.Models.Request
                                 {
                                     Division = request.Element(&lt;span class="str"&gt;"Division"&lt;/span&gt;).Value,
                                     Department = request.Element(&lt;span class="str"&gt;"Department"&lt;/span&gt;).Value,
                                 }).Skip((&lt;span class="kwrd"&gt;int&lt;/span&gt;)start).Take((&lt;span class="kwrd"&gt;int&lt;/span&gt;)limit)
                 }).&lt;strong class="highlight"&gt;FirstOrDefault()&lt;/strong&gt;;

   &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.Json(results);
}&lt;/pre&gt;
&lt;p&gt;And here's the corrected JSON it emits (note the absence of the outer square brackets):&lt;/p&gt;
&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;pre class="csharpcode"&gt;
{
   &lt;span class="str"&gt;"totalRecords"&lt;/span&gt;:200,
   &lt;span class="str"&gt;"requests"&lt;/span&gt;:[
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 1"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 5"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 2"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 4"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 3"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 5"&lt;/span&gt;,},
       {&lt;span class="str"&gt;"Division"&lt;/span&gt;:&lt;span class="str"&gt;"Division 4"&lt;/span&gt;,&lt;span class="str"&gt;"Department"&lt;/span&gt;:&lt;span class="str"&gt;"Department 6"&lt;/span&gt;,},
   ]
}&lt;/pre&gt;
&lt;p&gt;Seems like a dumb mistake to make but it took a bit of debugging to find it - hopefully this post will save someone out there some time.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-7301674969948778057?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/7301674969948778057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=7301674969948778057&amp;isPopup=true" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7301674969948778057" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7301674969948778057" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/EVbuOgOwqGQ/ext-js-jsonstore-and-linq-to-json.html" title="Ext JS JsonStore and Linq to JSON Gotcha" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/10/ext-js-jsonstore-and-linq-to-json.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-44808032207812458</id><published>2008-10-16T16:47:00.009+01:00</published><updated>2008-10-16T20:00:24.510+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="News" /><title type="text">Latest IQODE Work Goes Live - Nick Jr</title><content type="html">&lt;p&gt;I was recently employed by Nickelodeon UK to implement the refresh of the Nickelodeon Jr website (&lt;a href="http://www.nickjr.co.uk" class="external"&gt;www.nickjr.co.uk&lt;/a&gt;) which, I am please to say, is now alive and kicking.&lt;/p&gt;
&lt;p&gt;IQODE were required to keep the majority of the existing content "as is" and to apply the new layout, branding and navigation to the whole site. It was vital to retain the search engine positioning Nick Jr had gained over the years and to improve the maintainability of the site.&lt;/p&gt;
&lt;div style="text-align:center;margin:0px auto 10px;"&gt;&lt;a href="http://www.iqode.com/BlogFiles/uploaded_images/dora-769477.jpg"&gt;&lt;img class="blogPic" src="http://www.iqode.com/BlogFiles/uploaded_images/dora-769469.jpg" alt="Nick Jr Website Screenshot" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-44808032207812458?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/44808032207812458/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=44808032207812458&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/44808032207812458" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/44808032207812458" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/5GmGD5AYduY/latest-iqode-work-goes-live-nick-jr.html" title="Latest IQODE Work Goes Live - Nick Jr" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/10/latest-iqode-work-goes-live-nick-jr.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-7308858916042781918</id><published>2008-10-16T14:28:00.005+01:00</published><updated>2009-07-21T19:09:19.066+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nonsense" /><title type="text">All Your Chip...</title><content type="html">&lt;p&gt;Nice stencil graffiti spotted under the arch that links Bond Street to North Street.&lt;/p&gt;
&lt;p&gt;This probably only means something to Brighton residents (and those tourists stupid enough to eat their fish supper on the seafront).&lt;/p&gt;
&lt;div style="text-align:center;margin:10px auto 10px;"&gt;&lt;a href="http://www.iqode.com/BlogFiles/uploaded_images/Image028-701481.jpg"&gt;&lt;img class="blogPic" src="http://www.iqode.com/BlogFiles/uploaded_images/Image028-700651.jpg" border="0" alt="All your chip are belong to us" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-7308858916042781918?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/7308858916042781918/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=7308858916042781918&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7308858916042781918" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7308858916042781918" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/OiVMj86i95c/all-your-chip.html" title="All Your Chip..." /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/10/all-your-chip.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-7322101507089775345</id><published>2008-10-01T09:13:00.002+01:00</published><updated>2008-10-01T22:21:46.080+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Blogger" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="Linq" /><title type="text">Integrating a Blogger Atom Feed into an ASP.Net MVC Application</title><content type="html">&lt;p&gt;
        &lt;strong&gt;Part One:&lt;/strong&gt; Configure your Blogger Settings, Consuming Atom feeds with ASP.Net&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Two:&lt;/strong&gt; Configure your MVC Application - Routes, Controllers... ACTION!&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Three:&lt;/strong&gt; Create a Tag Cloud (Display all current labels with post counts)&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Four:&lt;/strong&gt; Create Archive Links&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Five:&lt;/strong&gt; Add Blog Search Capabilities&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Six:&lt;/strong&gt; Integrating Comments&lt;/p&gt;
    &lt;p&gt;
        &lt;strong&gt;Part Seven:&lt;/strong&gt; Disadvantages to this approach and how to improve things&lt;/p&gt;
    &lt;p&gt;
        In this series of posts I'm going to describe how to integrate an atom feed into
        an ASP.Net MVC application based on my experience integrating my Blogger blog into
        the &lt;a href="http://www.iqode.com"&gt;www.iqode.com&lt;/a&gt; site.&lt;/p&gt;
    &lt;p&gt;
        In this example I'm going to publish the blog to my server using the Blogger FTP
        publishing feature. You could simply consume a remote atom feed and display it in
        your MVC application but I want to create a much tighter integration. FTP Publishing
        throws up some interesting challenges when integrating into an MVC application and
        I'm going to elaborate more on this in my next post.&lt;/p&gt;
    &lt;h2&gt;
        Configure your Blogger Settings&lt;/h2&gt;
    &lt;p&gt;
        I'll assume you already have a Blogger blog, if not then it only takes a few minutes
        to &lt;a href="https://www.blogger.com/start" class="external"&gt;sign up to Blogger&lt;/a&gt;
        and make your first post.&lt;/p&gt;
    &lt;p&gt;
        OK, now you're signed into Blogger you need to go to your Blogger Settings tab aand
        follow these &lt;a href="http://help.blogger.com/bin/answer.py?answer=41438" class="external"&gt;
            instructions on setting up FTP Publishing&lt;/a&gt;.
    &lt;/p&gt;
    &lt;p&gt;
        Now go to your Archiving tab and, for now, set Archiving setting to No Archive.
        Scroll down and make sure Enable Post Pages is set to "Yes". Save your settings
        and move on to the Site Feed tab and complete the relevant Site Feed values. You
        also need to set the Blog Posts Feed drop down to "Full" then save your settings.
    &lt;/p&gt;
    &lt;p&gt;
        Now you have your blog set up and you're publishing your blog files and full feeds
        to your own server via FTP. Now open your MVC application in Visual Studio.&lt;/p&gt;
    &lt;h2&gt;
        Create Your Model Object&lt;/h2&gt;
    &lt;p&gt;
        An examination of the Atom feed xml will reveal the following structure:&lt;/p&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;feed&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span
    class="kwrd"&gt;='http://www.w3.org/2005/Atom'&lt;/span&gt; &lt;span class="attr"&gt;xmlns:openSearch&lt;/span&gt;&lt;span
        class="kwrd"&gt;='http://a9.com/-/spec/opensearchrss/1.0/'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;tag:blogger.com,1999:blog-8097474&lt;span
        class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2008-09-16T16:53:51.743+01:00&lt;span
        class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span
        class="kwrd"&gt;='text'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;IQODE Limited&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span
            class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;subtitle&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span
        class="kwrd"&gt;='html'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;ATTRACTIVE, INTUITIVE AND ACCESSIBLE WEBSITES, BUILT WITH WEB STANDARDS&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;subtitle&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
        class="kwrd"&gt;='alternate'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='text/html'&lt;/span&gt; &lt;span
            class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.iqode.com/Blog/Browse/'&lt;/span&gt;&lt;span
                class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
        class="kwrd"&gt;='self'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='application/atom+xml'&lt;/span&gt; &lt;span
            class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.blogger.com/feeds/8097474/posts/default'&lt;/span&gt;&lt;span
                class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
        class="kwrd"&gt;='http://schemas.google.com/g/2005#feed'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span
            class="kwrd"&gt;='application/atom+xml'&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.iqode.com/Feeds/atom.xml'&lt;/span&gt;&lt;span
                class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Steve&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://www.blogger.com/profile/15887521996067704936&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;email&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;noreply@blogger.com&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;email&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;generator&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span
        class="kwrd"&gt;='7.00'&lt;/span&gt; &lt;span class="attr"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.blogger.com'&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;Blogger&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;generator&lt;/span&gt;&lt;span
                class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;openSearch:totalResults&lt;/span&gt;&lt;span
        class="kwrd"&gt;&amp;gt;&lt;/span&gt;2&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;openSearch:totalResults&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;openSearch:startIndex&lt;/span&gt;&lt;span
        class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;openSearch:startIndex&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;openSearch:itemsPerPage&lt;/span&gt;&lt;span
        class="kwrd"&gt;&amp;gt;&lt;/span&gt;25&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;openSearch:itemsPerPage&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;tag:blogger.com,1999:blog-8097474.post-2242729009616470352&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;published&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2008-08-21T18:09:00.002+01:00&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;published&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;2008-09-15T14:29:52.307+01:00&lt;span
            class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;updated&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;category&lt;/span&gt; &lt;span class="attr"&gt;scheme&lt;/span&gt;&lt;span
            class="kwrd"&gt;='http://www.blogger.com/atom/ns#'&lt;/span&gt; &lt;span class="attr"&gt;term&lt;/span&gt;&lt;span
                class="kwrd"&gt;='News'&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span
            class="kwrd"&gt;='text'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;New IQODE Website Goes Live&lt;span
                class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;content&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span
            class="kwrd"&gt;='html'&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;h4&lt;span
                class="attr"&gt;&amp;amp;gt;&lt;/span&gt;"Sometimes you've just got to let it go and get it out there"&lt;span
                    class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/h4&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;p&lt;span
                        class="attr"&gt;&amp;amp;gt;&lt;/span&gt;A comment from the audience during the Q&lt;span class="attr"&gt;&amp;amp;amp;&lt;/span&gt;amp;A session after &lt;span
                            class="attr"&gt;&amp;amp;lt;&lt;/span&gt;a class="external" href="http://skillswap-brighton.org/2008/07/28/skillswap-goes-pretty/"&lt;span
                                class="attr"&gt;&amp;amp;gt;&lt;/span&gt;the latest Brighton Skillswap&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/a&lt;span
                                    class="attr"&gt;&amp;amp;gt;&lt;/span&gt; persuaded me to finally publish the latest IQODE website.&lt;span
                                        class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/p&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="attr"&gt;&amp;amp;lt;&lt;/span&gt;p&lt;span
                                            class="attr"&gt;&amp;amp;gt;&lt;/span&gt;So without further ado I give you... oh, you're already here.&lt;span
                                                class="attr"&gt;&amp;amp;lt;&lt;/span&gt;/p&lt;span class="attr"&gt;&amp;amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span
                                                    class="html"&gt;content&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
            class="kwrd"&gt;='alternate'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='text/html'&lt;/span&gt; &lt;span
                class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.iqode.com/Blog/Browse/2008/08/new-iqode-website-goes-live.html'&lt;/span&gt; &lt;span
                    class="attr"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;='New IQODE Website Goes Live'&lt;/span&gt;&lt;span
                        class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
            class="kwrd"&gt;='replies'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='text/html'&lt;/span&gt; &lt;span
                class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.blogger.com/comment.g?blogID=8097474&amp;amp;amp;postID=2242729009616470352&amp;amp;amp;isPopup=true'&lt;/span&gt; &lt;span
                    class="attr"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;='0 Comments'&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
            class="kwrd"&gt;='replies'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='application/atom+xml'&lt;/span&gt; &lt;span
                class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.iqode.com/Feeds/atom.xml'&lt;/span&gt; &lt;span
                    class="attr"&gt;title&lt;/span&gt;&lt;span class="kwrd"&gt;='Post Comments'&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
            class="kwrd"&gt;='self'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='application/atom+xml'&lt;/span&gt; &lt;span
                class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.blogger.com/feeds/8097474/posts/default/2242729009616470352'&lt;/span&gt;&lt;span
                    class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;link&lt;/span&gt; &lt;span class="attr"&gt;rel&lt;/span&gt;&lt;span
            class="kwrd"&gt;='edit'&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;='application/atom+xml'&lt;/span&gt; &lt;span
                class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;='http://www.blogger.com/feeds/8097474/posts/default/2242729009616470352'&lt;/span&gt;&lt;span
                    class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Steve&lt;span
                class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;http://www.blogger.com/profile/15887521996067704936&lt;span
                class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;uri&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;email&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;noreply@blogger.com&lt;span
                class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;email&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;author&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;entry&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;feed&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;p&gt;
        So to model a blog post I'm going to need the following Model Object so right click
        your Model folder and add a new class and the following class definition.
    &lt;/p&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; BlogPost
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Title { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; LinkTitle { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; DateTime Published { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Url { get; set; }&lt;!--    &lt;span class="kwrd"&gt;public&lt;/span&gt; CommentsInfo CommentsInfo { get; set; }--&gt;
    &lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; Tags { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Content { get; set; }
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Author { get; set; }
}&lt;/pre&gt;
    &lt;p&gt;
    &lt;/p&gt;
    &lt;h2&gt;
        Read the Feed Using Linq to XML&lt;/h2&gt;
    &lt;p&gt;
        Next, Create a method to read in the feed xml, transform it into model objects and
        return a generic list of BlogPost objects. Linq is an excellent tool to achieve
        this in a very few lines of code...&lt;/p&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;protected&lt;/span&gt; IEnumerable&amp;lt;BlogPost&amp;gt; GetPosts()
{
    var posts = HttpRuntime.Cache[&lt;span class="str"&gt;"IQODEFeed"&lt;/span&gt;] &lt;span class="kwrd"&gt;as&lt;/span&gt; IEnumerable&amp;lt;BlogPost&amp;gt;;
    &lt;span class="kwrd"&gt;if&lt;/span&gt; (posts == &lt;span class="kwrd"&gt;null&lt;/span&gt;)
    {
        &lt;span class="kwrd"&gt;string&lt;/span&gt; feedPath = Server.MapPath(IQODEWebLib.Config.Current.BlogFeedURL);
        XDocument rssFeed = XDocument.Load(feedPath);
        XNamespace atomNS = &lt;span class="str"&gt;"http://www.w3.org/2005/Atom"&lt;/span&gt;;

        posts = from item &lt;span class="kwrd"&gt;in&lt;/span&gt; rssFeed.Root.Descendants(atomNS + &lt;span
            class="str"&gt;"entry"&lt;/span&gt;)
                    select &lt;span class="kwrd"&gt;new&lt;/span&gt; BlogPost
                    {
                        Title = item.Element(atomNS + &lt;span class="str"&gt;"title"&lt;/span&gt;).Value,
                        LinkTitle = GetLinkTitle(item.Element(atomNS + &lt;span class="str"&gt;"title"&lt;/span&gt;).Value),
                        Published = DateTime.Parse(item.Element(atomNS + &lt;span class="str"&gt;"published"&lt;/span&gt;).Value),
                        Content = item.Element(atomNS + &lt;span class="str"&gt;"content"&lt;/span&gt;).Value,
                        Author = item.Element(atomNS + &lt;span class="str"&gt;"author"&lt;/span&gt;).Element(atomNS + &lt;span
                            class="str"&gt;"name"&lt;/span&gt;).Value,&lt;!--CommentsInfo = GetCommentsInfo(item.Elements(atomNS + &lt;span class="str"&gt;"link"&lt;/span&gt;)),--&gt;
                        Tags = (from category &lt;span class="kwrd"&gt;in&lt;/span&gt; item.Elements(atomNS + &lt;span class="str"&gt;"category"&lt;/span&gt;)
                                orderby category.Value
                                select category.Attribute(&lt;span class="str"&gt;"term"&lt;/span&gt;).Value).ToList()

                    };

        &lt;span class="rem"&gt;// cache and set dependency on the local feed file&lt;/span&gt;
        HttpRuntime.Cache.Insert(&lt;span class="str"&gt;"IQODEFeed"&lt;/span&gt;, posts, &lt;span class="kwrd"&gt;new&lt;/span&gt; CacheDependency(feedPath),DateTime.MaxValue, System.Web.Caching.Cache.NoSlidingExpiration);

    }
    &lt;span class="kwrd"&gt;return&lt;/span&gt; posts;
}&lt;/pre&gt;
    &lt;p&gt;
        Two things to note here:&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;To read the atom feed I need to combine the atom namespace with the local name when
            constructing the Linq statement.&lt;/li&gt;
        &lt;li&gt;I'm caching this list and setting a &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.caching.cachedependency.aspx"
            class="external blogEnternal"&gt;cache dependency&lt;/a&gt; on the actual feed xml file.
            This way if the feed file changes the cache item is automatically removed and my
            code reloads the feed xml.&lt;/li&gt;
    &lt;/ul&gt;
    &lt;p&gt;
        Next create a new controller for your blog index page and drop in the code blow.&lt;/p&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; ActionResult Index()
{

    var posts = GetPosts();

    ViewData.Model = posts.ToList();

    &lt;span class="kwrd"&gt;return&lt;/span&gt; View();
}&lt;/pre&gt;
    &lt;p&gt;
        Make sure your View page is strongly typed, for example...
    &lt;/p&gt;
    &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;partial&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Posts : System.Web.Mvc.ViewPage&amp;lt;List&amp;lt;BlogPost&amp;gt;&amp;gt;
{

}&lt;/pre&gt;
    &lt;p&gt;
        ...and then you can MVC magically reference the Posts Model in your code&lt;/p&gt;
    &lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
    &lt;pre class="csharpcode"&gt;
&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var BlogPost &lt;span
    class="kwrd"&gt;in&lt;/span&gt; ViewData.Model) {&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span
        class="html"&gt;strong&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=Html.RouteLink(BlogPost.Title, &lt;span
            class="str"&gt;"Blog"&lt;/span&gt;, &lt;span class="kwrd"&gt;new&lt;/span&gt; { id = BlogPost.Published.Year, month = BlogPost.Published.Month, title = BlogPost.LinkTitle }, &lt;span
                class="kwrd"&gt;null&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span
                    class="html"&gt;strong&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;h3&lt;/span&gt;&lt;span
                        class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span
        class="kwrd"&gt;="postBody"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=BlogPost.Content &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span
        class="kwrd"&gt;="author"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;Published:&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
                class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt;=BlogPost.Published.ToString(&lt;span
                    class="str"&gt;"dddd, dd MMMM yyyy hh:mm tt"&lt;/span&gt;)&lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt; by &lt;span
                        class="asp"&gt;&amp;lt;%&lt;/span&gt;= BlogPost.Author &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span
                            class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span
        class="kwrd"&gt;="tags"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;Tags:&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
                class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var tag &lt;span class="kwrd"&gt;in&lt;/span&gt; BlogPost.Tags)
     {
         Response.Write(&lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;span class="str"&gt;"&amp;lt;span title='{0}'&amp;gt;{1}
             &amp;lt;/span&amp;gt;"&lt;/span&gt;, &lt;span class="str"&gt;"See all posts tagged "&lt;/span&gt; + tag, Html.ActionLink(tag, tag, &lt;span
                 class="str"&gt;"Blog/Tags"&lt;/span&gt;)));   

    } &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;p&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span
        class="kwrd"&gt;="comments"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
            class="kwrd"&gt;&amp;gt;&lt;/span&gt;Comments:&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;strong&lt;/span&gt;&lt;span
                class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span
                    class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;="&amp;lt;%=BlogPost.CommentsInfo.Link%&amp;gt;"&lt;/span&gt; &lt;span
                        class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;="external-blog"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span
                            class="asp"&gt;&amp;lt;%&lt;/span&gt;=BlogPost.CommentsInfo.Title &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;span
                                class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span
                                    class="html"&gt;p&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="asp"&gt;&amp;lt;%&lt;/span&gt; } &lt;span class="asp"&gt;%&amp;gt;&lt;/span&gt;&lt;/pre&gt;
    &lt;p&gt;
        You'll notice some extra cruft in the code above which I will be covering in later
        posts but I'm sure you get the idea. Stay tuned for Part Two where I'll be covering
        in more details the controller actions, routing and rendering within the application.
    &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-7322101507089775345?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/7322101507089775345/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=7322101507089775345&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7322101507089775345" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/7322101507089775345" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/dHt6fLURaWA/integrating-blogger-into-aspnet-mvc_26.html" title="Integrating a Blogger Atom Feed into an ASP.Net MVC Application" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/09/integrating-blogger-into-aspnet-mvc_26.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-639927956209230561</id><published>2008-09-11T17:40:00.020+01:00</published><updated>2008-10-23T13:22:48.379+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title type="text">CSS to jQuery ASP.Net HTTPHandler</title><content type="html">&lt;p&gt;In this post I'm going to explain why and how to automatically turn css into jQuery code that is executed on page load. The solution is written for ASP.Net but in theory it could be ported to any other framework.&lt;/p&gt;
    &lt;p&gt;
        It's nice to add various visual enhancements and tweaks to websites I develop and
        I do that using the &lt;a href="http://jquery.com/" class="external"&gt;jQuery&lt;/a&gt; Javascript library.
        These enhancments, in my mind, are not necessary but nice to haves. However, it's
        important to ensure that web pages are still accessible and render well when Javascript
        is disabled. So, according to the principles of &lt;a href="http://en.wikipedia.org/wiki/Progressive_enhancement" class="external"&gt;
            Progressive Enhancement&lt;/a&gt;, I layer the effects on top of the "vanilla" page
        using jQuery. A simple example is my &lt;a href="http://www.iqode.com/About" class="external"&gt;About&lt;/a&gt;
        page. Try turning Javascript on and off then reloading. Without Javascript each
        section is displayed inline. With Javascript turned on some jQuery voodoo shows
        and hides the sections with some nice fade transition effects .
    &lt;/p&gt;
    &lt;p&gt;
        Where am I going with this? Well I find myself writing a lot of jQuery in order
        to apply some CSS to various elements in order to switch them from vanilla mode
        into singing and dancing mode. Which means I need to write script to run as the
        page loads to override the vanilla CSS rules.
    &lt;/p&gt;
    &lt;p&gt;
        And?&lt;/p&gt;
    &lt;p&gt;
        I thought it would be nice to author these styles in a way I'm familiar with - style
        sheets. So I wrote a simple ASP.Net HTTP Handler to parse certain CSS files (I chose
        the .jqcss file extension) and spit out jQuery instead.&lt;/p&gt;
    &lt;p&gt;
        For example:&lt;/p&gt;

        &lt;pre class="csharpcode"&gt;
.test {
    background-color: red;
    padding: 10px;
    background-position: top left;
    margin: 5px;
}
h2:first {
    color: red;
}
h2[id="3"] {
    color: blue;
}
#blue {
    background-color: blue;
    color: #fff;
    padding: 5px;
}
        &lt;/pre&gt;    

    &lt;p&gt;
        Becomes:
    &lt;/p&gt;
    &lt;pre class="csharpcode"&gt;
$(document).ready(function(){
    $('.test').css({backgroundColor:'red',padding:'10px',backgroundPosition:'top left',margin:'5px'});
    $('h2:first').css({color:'red'});
    $('h2[id="3"]').css({color:'blue'});
    $('#blue').css({backgroundColor:'blue',color:'#fff',padding:'5px'});
});
    &lt;/pre&gt;
    &lt;p&gt;
        To use the HTTP Handler you need to add a reference to your handler in your web.config httpHandlers section and tell it to handle .jqcss files, as follows:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;httpHandlers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;add&lt;/span&gt; &lt;span class="attr"&gt;verb&lt;/span&gt;&lt;span class="kwrd"&gt;="*"&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;="*.jqcss"&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="IQODE.WebLib.Handlers.JQCSSHandler"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;httpHandlers&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
        
    &lt;p&gt;Then create your .jqcss file containing the style rules you want to be applied on load. Finally you need to add a link to your .jqcss file from your page:&lt;/p&gt;
    &lt;div class="codeSample"&gt;
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;="text/javascript"&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;="test.jqcss"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;    &lt;/div&gt;
    
    &lt;p&gt;
        I'm not absolutely convinced there's a huge need for this technique. It simplified the develoment of 
        my site, iqode.com, and keeps my pages tidier - I'm not a massive fan of having a load of inline Javascript cluttering up my pages. 
        More importantly, by placing this script in an external file I can also manage 
        how the file gets cached by my application and the browser - in ASP.Net I can set a cache 
        dependancy on the .jqcss file itself and only refresh the cache if the file 
        changes. This means the handler only needs to parse the file occasionally. &lt;/p&gt;
&lt;p&gt;
        Here&amp;#39;s the entire source code for the HTTPHandler - I removed the cache control 
        code etc. for brevity. One point of interest is the use of an arbitrary Web Control (a button in this case) - so I don&amp;#39;t need to parse &lt;i&gt;all&lt;/i&gt; the style rules for each selector I load the entire rules string into the Web Controls CssStyleCollection object. This object parses it for me and I simply iterate of the key collection pulling out each rule/value pair to build the jQuery statement.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Collections;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text.RegularExpressions;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Text;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwrd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;

&lt;span class="kwrd"&gt;namespace&lt;/span&gt; IQODE.WebLib.Handlers
{
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; JQCSSHandler : IHttpHandler
    {

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ProcessRequest(HttpContext context)
        {
            &lt;span class="rem"&gt;// Get the physical path of the file being processed&lt;/span&gt;
            &lt;span class="kwrd"&gt;string&lt;/span&gt; File = context.Request.PhysicalPath;
            &lt;span class="kwrd"&gt;string&lt;/span&gt; css = &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty;
            StringBuilder sb = &lt;span class="kwrd"&gt;new&lt;/span&gt; StringBuilder();
            Button btn = &lt;span class="kwrd"&gt;new&lt;/span&gt; Button();

            &lt;span class="rem"&gt;// Open the file, read css&lt;/span&gt;
            &lt;span class="kwrd"&gt;using&lt;/span&gt; (System.IO.StreamReader reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; System.IO.StreamReader(File))
            {
                css = reader.ReadToEnd();
            }

            css = RemoveWhitespace(css);

            &lt;span class="kwrd"&gt;string&lt;/span&gt;[] cssRules = css.Split(&lt;span class="str"&gt;'}'&lt;/span&gt;);

            sb.AppendLine(&lt;span class="str"&gt;"$(document).ready(function(){"&lt;/span&gt;);

            &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; cssRule &lt;span class="kwrd"&gt;in&lt;/span&gt; cssRules)
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (!&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(cssRule))
                {
                    &lt;span class="kwrd"&gt;string&lt;/span&gt; selector = cssRule.Split(&lt;span class="str"&gt;'{'&lt;/span&gt;).GetValue(0).ToString().Trim();
                    &lt;span class="kwrd"&gt;string&lt;/span&gt; rules = cssRule.Split(&lt;span class="str"&gt;'{'&lt;/span&gt;).GetValue(1).ToString();

                    CssStyleCollection sc = btn.Style;

                    sc.Value = rules;
                    rules = &lt;span class="str"&gt;""&lt;/span&gt;;

                    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; key &lt;span class="kwrd"&gt;in&lt;/span&gt; btn.Style.Keys)
                    {
                        rules += ConvertToCamel(key) + &lt;span class="str"&gt;":'"&lt;/span&gt; + btn.Style[key].Replace(&lt;span class="str"&gt;"'"&lt;/span&gt;, &lt;span class="str"&gt;"\""&lt;/span&gt;) + &lt;span class="str"&gt;"',"&lt;/span&gt;;
                    }
                    sb.AppendLine(&lt;span class="str"&gt;" $('"&lt;/span&gt; + selector + &lt;span class="str"&gt;"').css({"&lt;/span&gt; + rules.TrimEnd(&lt;span class="str"&gt;','&lt;/span&gt;) + &lt;span class="str"&gt;"});"&lt;/span&gt;);
                }
            }

            sb.AppendLine(&lt;span class="str"&gt;"});"&lt;/span&gt;);

            context.Response.ContentType = &lt;span class="str"&gt;"text/css"&lt;/span&gt;;
            context.Response.ContentType = &lt;span class="str"&gt;"text/javascript"&lt;/span&gt;;
            context.Response.Write(sb.ToString());
        }
        
        &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; ConvertToCamel(&lt;span class="kwrd"&gt;string&lt;/span&gt; s)
        {
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (s.IndexOf(&lt;span class="str"&gt;'-'&lt;/span&gt;) &amp;lt; 0)
                {
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; s;
                }
                &lt;span class="kwrd"&gt;string&lt;/span&gt;[] words = s.Split(&lt;span class="str"&gt;'-'&lt;/span&gt;);
                &lt;span class="kwrd"&gt;string&lt;/span&gt; word1 = words[0];
                &lt;span class="kwrd"&gt;string&lt;/span&gt; word2 = words[1];
                &lt;span class="kwrd"&gt;string&lt;/span&gt; lttr = word2.Substring(0, 1).ToUpper();
                &lt;span class="kwrd"&gt;return&lt;/span&gt; word1 + lttr + word2.Remove(0, 1);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception)
            {
                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Exception(&lt;span class="str"&gt;"Error Parsing jQcss file - malformed css attribute found in stylesheet: "&lt;/span&gt; + s);
            }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsReusable
        {
            get
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;false&lt;/span&gt;;
            }
        }

        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; RemoveWhitespace(&lt;span class="kwrd"&gt;string&lt;/span&gt; str)
        {
            &lt;span class="kwrd"&gt;try&lt;/span&gt;
            {
                &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt;.IsNullOrEmpty(str))
                {
                    &lt;span class="kwrd"&gt;return&lt;/span&gt; str;
                }
                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Regex(&lt;span class="str"&gt;@"[\t\r\n]"&lt;/span&gt;).Replace(str, &lt;span class="kwrd"&gt;string&lt;/span&gt;.Empty);
            }
            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception)
            {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; str;
            }

        }
    }
}

&lt;/pre&gt;        
 &lt;p&gt;
  &amp;nbsp;&lt;/p&gt;
 &lt;p&gt;
  And that&amp;#39;s it... I hope someone finds this useful. You &lt;i&gt;could&lt;/i&gt; simply put all our jQuery css stuff in a separate script file but I found it easier and quicker to do it this way.&lt;/p&gt;
 &lt;p&gt;
  &lt;a href="http://www.iqode.com/Home/Contact/"&gt;Drop me a line&lt;/a&gt; if you have any questions, spot a bug or have suggestions for improvement.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-639927956209230561?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/639927956209230561/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=639927956209230561&amp;isPopup=true" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/639927956209230561" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/639927956209230561" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/Dbt7ifGgF6s/css-to-jquery-aspnet-httphandler-css3.html" title="CSS to jQuery ASP.Net HTTPHandler" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/09/css-to-jquery-aspnet-httphandler-css3.html</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-8097474.post-2242729009616470352</id><published>2008-08-21T18:09:00.002+01:00</published><updated>2008-09-15T14:29:52.307+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="News" /><title type="text">New IQODE Website Goes Live</title><content type="html">&lt;h4&gt;"Sometimes you've just got to let it go and get it out there"&lt;/h4&gt;&lt;p&gt;A comment from the audience during the Q&amp;amp;A session after &lt;a class="external" href="http://skillswap-brighton.org/2008/07/28/skillswap-goes-pretty/"&gt;the latest Brighton Skillswap&lt;/a&gt; persuaded me to finally publish the latest IQODE website.&lt;/p&gt;&lt;p&gt;So without further ado I give you... oh, you're already here.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8097474-2242729009616470352?l=www.iqode.com%2FBlog%2FBrowse'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/2242729009616470352/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=8097474&amp;postID=2242729009616470352&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/2242729009616470352" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8097474/posts/default/2242729009616470352" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/iqode/~3/QTlyUWOe1bU/new-iqode-website-goes-live.html" title="New IQODE Website Goes Live" /><author><name>Steve</name><uri>http://www.blogger.com/profile/15887521996067704936</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd="http://schemas.google.com/g/2005" name="OpenSocialUserId" value="09522909954247335400" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.iqode.com/Blog/Browse/2008/08/new-iqode-website-goes-live.html</feedburner:origLink></entry></feed>
