<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Joe Stevens' Blog</title>
	
	<link>http://www.joe-stevens.com</link>
	<description>Everything .NET and C#</description>
	<lastBuildDate>Tue, 23 Feb 2010 21:55:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/JoeStevensBlog" /><feedburner:info uri="joestevensblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Populate a select dropdown list using jQuery and Ajax</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/E0XoEgnDKvs/</link>
		<comments>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 02:49:36 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=459</guid>
		<description>In this post I&amp;#8217;ll explain how to populate a select dropdownlist using jQuery and Ajax.  I am using an ASP.NET web application and page methods to perform the Ajax calls.  Using page methods means that you do not need a seperate web service, which is good if the functionality is specifically for the page.  The [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/E0XoEgnDKvs" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/02/23/populate-a-select-dropdown-list-using-jquery-and-ajax/</feedburner:origLink></item>
		<item>
		<title>Convert all static text email addresses to mailto links using jQuery</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/et9zuBVYr44/</link>
		<comments>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 03:02:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Regular Expression]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=452</guid>
		<description>In this post I&amp;#8217;ll show how to use  jQuery to automatically convert all email addesses from static text into a mailto link.

Consider the following table which contains a person&amp;#8217;s details including their email address.

Using jQuery I can easily find table cells that contain an email address by using a regular expression and then convert the address [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/et9zuBVYr44" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/02/18/convert-all-static-text-email-addresses-to-mailto-links-using-jquery/</feedburner:origLink></item>
		<item>
		<title>ASP.NET MVC – Using Controller.UpdateModel when using a ViewModel</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/wGBkPI2Dds8/</link>
		<comments>http://www.joe-stevens.com/2010/02/17/asp-net-mvc-using-controller-updatemodel-when-using-a-viewmodel/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 02:51:42 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[MVC]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[ViewModel]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=443</guid>
		<description>When updating a model in MVC it is common to use the Controller.UpdateModel method.  I recently ran into an issue where I was using a custom ViewModel which meant that UpdateModel could not map the updated data back to my model object. The solution to this was a simple one, but not as obvious as [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/wGBkPI2Dds8" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/17/asp-net-mvc-using-controller-updatemodel-when-using-a-viewmodel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/02/17/asp-net-mvc-using-controller-updatemodel-when-using-a-viewmodel/</feedburner:origLink></item>
		<item>
		<title>Creating a Delete link with MVC using POST to avoid security issues</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/P0lP8eXo08Q/</link>
		<comments>http://www.joe-stevens.com/2010/02/16/creating-a-delete-link-with-mvc-using-post-to-avoid-security-issues/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 03:43:39 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ASP.NET]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=438</guid>
		<description>It is fairly common to have a list of records with a hyperlink to delete a record.  The problem here is that with MVC the hyperlink will use a GET request to delete a record.  This is a fairly big security issue as anybody can browse to the URL and delete a record from your system.  [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/P0lP8eXo08Q" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/16/creating-a-delete-link-with-mvc-using-post-to-avoid-security-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/02/16/creating-a-delete-link-with-mvc-using-post-to-avoid-security-issues/</feedburner:origLink></item>
		<item>
		<title>Creating and using snippets in Visual Studio 2008</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/SjGLSDuSVXQ/</link>
		<comments>http://www.joe-stevens.com/2010/02/04/creating-and-using-snippets-in-visual-studio-2008/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 03:30:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=429</guid>
		<description>Visual Studio contains a number of predefined snippets. Snippets are usually available for common code that is used frequently allowing the developer to insert this code quickly without having to retype it every time. I often use the try and if snippets, but you can also create your own custom snippets. Recently I found myself to [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/SjGLSDuSVXQ" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/02/04/creating-and-using-snippets-in-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/02/04/creating-and-using-snippets-in-visual-studio-2008/</feedburner:origLink></item>
		<item>
		<title>Twitter</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/pUTV01aJzZs/</link>
		<comments>http://www.joe-stevens.com/2010/01/18/twitter/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 02:29:30 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/2010/01/18/twitter/</guid>
		<description>I decided to start a twitter account so if you feel like it you can follow me&amp;#8230;&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/pUTV01aJzZs" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/18/twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/18/twitter/</feedburner:origLink></item>
		<item>
		<title>Force client-side JavaScript event to fire programatically using jQuery</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/xAK4urgMP84/</link>
		<comments>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 05:57:33 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=396</guid>
		<description>Earlier today I needed to force a clide side event to fire programatically using jQuery.
I found you can do this easily with the jQuery trigger method:

$(&amp;#34;#myControl&amp;#34;).trigger(&amp;#34;change&amp;#34;);

The above will trigger the change event of the control with ID &amp;#8216;myControl&amp;#8217;&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/xAK4urgMP84" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/15/force-client-side-javascript-event-to-fire-programatically-using-jquery/</feedburner:origLink></item>
		<item>
		<title>Edit in place / inline editing with jQuery, jTemplates and ASP.NET</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/jisylXxVonI/</link>
		<comments>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 02:19:05 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=386</guid>
		<description>Download source
In this post I talked about how to use the jTemplates plugin for jQuery. Using my final example in the post I thought it would be cool to try and add some &amp;#8216;edit in place&amp;#8217; functionality to the table.
For this to work I&amp;#8217;ve created a Data Access Layer using Linq to XML. My web [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/jisylXxVonI" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/12/edit-in-place-inline-editing-with-jquery-jtemplates-and-asp-net/</feedburner:origLink></item>
		<item>
		<title>Linq to XML Tutorial</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/eLg4kfEEeB0/</link>
		<comments>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 02:42:09 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[linq to xml]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=377</guid>
		<description>Download source
This is an introduction to Linq to XML showing how to read, insert, update and delete from an XML file.

First of all lets look at the XML file I will be using:

&amp;#60;?xml version=&amp;#34;1.0&amp;#34; encoding=&amp;#34;utf-8&amp;#34;?&amp;#62;
&amp;#60;Customers&amp;#62;
 &amp;#60;Customer ID=&amp;#34;1&amp;#34;&amp;#62;
  &amp;#60;Forename&amp;#62;Joe&amp;#60;/Forename&amp;#62;
  &amp;#60;Surname&amp;#62;Stevens&amp;#60;/Surname&amp;#62;
  &amp;#60;DOB&amp;#62;31/01/1983&amp;#60;/DOB&amp;#62;
  &amp;#60;Location&amp;#62;Sydney&amp;#60;/Location&amp;#62;
 &amp;#60;/Customer&amp;#62;
 &amp;#60;Customer ID=&amp;#34;2&amp;#34;&amp;#62;
  &amp;#60;Forename&amp;#62;Tom&amp;#60;/Forename&amp;#62;
  &amp;#60;Surname&amp;#62;Male&amp;#60;/Surname&amp;#62;
  &amp;#60;DOB&amp;#62;02/02/1977&amp;#60;/DOB&amp;#62;
  &amp;#60;Location&amp;#62;Brisbane&amp;#60;/Location&amp;#62;
 &amp;#60;/Customer&amp;#62;
 &amp;#60;Customer ID=&amp;#34;3&amp;#34;&amp;#62;
  &amp;#60;Forename&amp;#62;Emily &amp;#60;/Forename&amp;#62;
  &amp;#60;Surname&amp;#62;Stevens&amp;#60;/Surname&amp;#62;
  &amp;#60;DOB&amp;#62;14/01/1988&amp;#60;/DOB&amp;#62;
  &amp;#60;Location&amp;#62;Sydney&amp;#60;/Location&amp;#62;
 &amp;#60;/Customer&amp;#62;
 &amp;#60;Customer ID=&amp;#34;4&amp;#34;&amp;#62;
  &amp;#60;Forename&amp;#62;Lee&amp;#60;/Forename&amp;#62;
  &amp;#60;Surname&amp;#62;Phipps&amp;#60;/Surname&amp;#62;
  &amp;#60;DOB&amp;#62;05/12/1982&amp;#60;/DOB&amp;#62;
  &amp;#60;Location&amp;#62;Melbourne&amp;#60;/Location&amp;#62;
 &amp;#60;/Customer&amp;#62;
 &amp;#60;Customer ID=&amp;#34;5&amp;#34;&amp;#62;
  &amp;#60;Forename&amp;#62;Saul&amp;#60;/Forename&amp;#62;
  &amp;#60;Surname&amp;#62;Stevens&amp;#60;/Surname&amp;#62;
  &amp;#60;DOB&amp;#62;02/08/1984&amp;#60;/DOB&amp;#62;
  &amp;#60;Location&amp;#62;Perth&amp;#60;/Location&amp;#62;
 &amp;#60;/Customer&amp;#62;
&amp;#60;/Customers&amp;#62;

As you can see it&amp;#8217;s a very simple list of customers.  In my project I [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/eLg4kfEEeB0" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/</feedburner:origLink></item>
		<item>
		<title>Using the jTemplate jquery plugin with ajax and ASP.NET</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/YZuZnWa_RBE/</link>
		<comments>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 04:32:03 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[jtemplates]]></category>
		<category><![CDATA[web service]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=367</guid>
		<description>Download source
A guy in work introduced me to jTemplates, a template engine plugin for jQuery. It allows you to easily bind JavaScript objects to a defined template and also has some other nifty features.
I&amp;#8217;ve found jTemplates to be particularly good when using ajax to display any information quickly and easily.
First I&amp;#8217;ll explain how to create [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/YZuZnWa_RBE" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/05/using-the-jtemplate-jquery-plugin-with-ajax-and-asp-net/</feedburner:origLink></item>
		<item>
		<title>Using jQuery to make ajax calls to an ASMX web service using ASP.NET</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/urHmU8eBibw/</link>
		<comments>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 06:02:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=351</guid>
		<description>Download source
Making ajax calls to an ASP.NET web service using jQuery is too easy.  In this post I&amp;#8217;ll explain how to do it!

Start by creating a new web project and adding a new ASMX web service:

Open the new web service and uncomment the following line to allow the web service to be called from script.

[System.Web.Script.Services.ScriptService]

The web [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/urHmU8eBibw" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2010/01/04/using-jquery-to-make-ajax-calls-to-an-asmx-web-service-using-asp-net/</feedburner:origLink></item>
		<item>
		<title>Using jQuery’s Each method to iterate through a JavaScript array</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/HloA9ObLQbo/</link>
		<comments>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:26:45 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Each]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=345</guid>
		<description>The Each method in jQuery is pretty useful and can be used to iterate through the elements within a jQuery object.
I&amp;#8217;ve been using it recently to iterate through JavaScript arrays.  It saves having to use a for loop and the code looks nicer.

Say I have the following code that creates an array and outputs the values [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/HloA9ObLQbo" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/12/30/using-jquerys-each-method-to-iterate-through-a-javascript-array/</feedburner:origLink></item>
		<item>
		<title>JSON Serialization using the DataContractJsonSerializer and C#</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/YMIgekY48u4/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 05:25:05 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[deserialization]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[serialization]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=336</guid>
		<description>Download source code
Previously I&amp;#8217;d done JSON serialization using the JavaScriptSerializer which is part of AJAX Extensions 1.0, but this is now obsolete.
.NET 3.5 introduced the DataContractJsonSerializer class.  The class sits in the System.Runtime.Serialization.Json namespace which is curiously hidden away in the System.ServiceModel.Web assembly.
The DataContractJsonSerializer can serialize a class that contains the Serializable attribute or any [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/YMIgekY48u4" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/12/29/json-serialization-using-the-datacontractjsonserializer-and-c/</feedburner:origLink></item>
		<item>
		<title>JavaScript inline if statement</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/EqzlN8_tss8/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 23:20:37 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[if statement]]></category>
		<category><![CDATA[inline]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=333</guid>
		<description>The JavaScript inline if statement is identical to the one in C#:

var forename = (gender == 'male') ? 'Joe' : 'Emily';&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/EqzlN8_tss8" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/12/29/javascript-inline-if-statement/</feedburner:origLink></item>
		<item>
		<title>Escape curly braces when using String.Format or StringBuilder.AppendFormat</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/mzMn-csIaUc/</link>
		<comments>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 22:44:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[stringbuilder]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=330</guid>
		<description>I was using the StringBuilder to create a JSON string which included an array and therefore curly braces, but I got an exception as curly braces are used to define the parameters for the format.

sb.AppendFormat(&amp;#34;{\&amp;#34;Forename\&amp;#34;:\&amp;#34;{0}\&amp;#34;,\&amp;#34;Surname\&amp;#34;:\&amp;#34;{1}\&amp;#34;}&amp;#34;, person.Forename, person.Surname);

At first I tried adding a backslash which is used to escape the quotation mark but this didn&amp;#8217;t work, so I tried the double [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/mzMn-csIaUc" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/12/29/escape-curly-braces-when-using-string-format-or-stringbuilder-appendformat/</feedburner:origLink></item>
		<item>
		<title>Linq to SQL Tutorial – Linq to SQL Generic Framework using reflection</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/wcvvxuV62HQ/</link>
		<comments>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 03:01:11 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[generic]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/</guid>
		<description>Download source code
In a previous post; Base Repository/Business Logic wrapper, I talked about a basic Linq to SQL Framework I created.  I then extended it in my ObjectDataSource binding with paging and sorting post to show how to use it with the ObjectDataSource.
The problem was that although it worked quite nicely for getting all [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/wcvvxuV62HQ" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/</feedburner:origLink></item>
		<item>
		<title>Linq to SQL Tutorial – Using Load Options to preload data immediately without lazy loading</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/KhYOGtph0D4/</link>
		<comments>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 09:49:27 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq To SQL]]></category>
		<category><![CDATA[load options]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=304</guid>
		<description>Download source
With Linq to SQL lazy loading is used by default. That means that if one object contains another object, the child object will only be loaded when first accessing it.  Using Load Options it is possible to tell Linq to SQL to also load the child object at the same time as loading [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/KhYOGtph0D4" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/</feedburner:origLink></item>
		<item>
		<title>ASP.NET FormView SetFocus</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/DrLdqctcOl4/</link>
		<comments>http://www.joe-stevens.com/2009/11/20/asp-net-formview-setfocus/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 02:31:35 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[formview]]></category>
		<category><![CDATA[setfocus]]></category>
		<category><![CDATA[textbox]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=287</guid>
		<description>I have FormView and on changing to Edit mode I wanted to set focus to the first textbox. I thought I&amp;#8217;d do this hooking into the ModeChanged event but this doesn&amp;#8217;t work as the textbox hasn&amp;#8217;t been rendered.
I then tried overriding the Render method and setting the focus after rendering; at this point the control [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/DrLdqctcOl4" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/11/20/asp-net-formview-setfocus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/11/20/asp-net-formview-setfocus/</feedburner:origLink></item>
		<item>
		<title>Read only Automatic Properties in C#</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/dAFy1tePdWQ/</link>
		<comments>http://www.joe-stevens.com/2009/11/17/read-only-automatic-properties-in-c/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 02:45:14 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[automatic properties]]></category>
		<category><![CDATA[automatic property]]></category>
		<category><![CDATA[read only]]></category>
		<category><![CDATA[readonly]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=285</guid>
		<description>Automatic Properties were a nice addition to C# 3 and I use them all the time. A lot of people may already know this but somehow I only found out this week; you can create a read only automatic property simply by adding the &amp;#8216;private&amp;#8217; keyword before &amp;#8217;set&amp;#8217;:


public class UserEventArgs : EventArgs
{
    public UserEventArgs(int userID)
    [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/dAFy1tePdWQ" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/11/17/read-only-automatic-properties-in-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/11/17/read-only-automatic-properties-in-c/</feedburner:origLink></item>
		<item>
		<title>Desktop wallpaper across dual monitors</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/rXqDFTN4KRo/</link>
		<comments>http://www.joe-stevens.com/2009/10/24/desktop-wallpaper-across-dual-monitors/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 03:51:12 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=274</guid>
		<description>Yesterday I stitched together a few images of Sydney Harbour that I took on my way to work:

I wanted to make it a wallpaper over both of my monitors. When playing around with the settings I found that the only option that seemed to do anything over both monitors was TILE.  I resized the image [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/rXqDFTN4KRo" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/10/24/desktop-wallpaper-across-dual-monitors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/10/24/desktop-wallpaper-across-dual-monitors/</feedburner:origLink></item>
		<item>
		<title>Convert file size bytes to megabyte/gigabyte string using C#</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/znEU9SwIi6A/</link>
		<comments>http://www.joe-stevens.com/2009/10/21/convert-file-size-bytes-to-megabytegigabyte-string-using-c/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 04:32:27 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[bytes]]></category>
		<category><![CDATA[extension method]]></category>
		<category><![CDATA[file size]]></category>
		<category><![CDATA[gigabytes]]></category>
		<category><![CDATA[int32]]></category>
		<category><![CDATA[kilobytes]]></category>
		<category><![CDATA[megabytes]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=270</guid>
		<description>I feel like I haven&amp;#8217;t posted in ages. Have been busy changing job and moving house but I have a list of things I want to blog about soon.
Recently I needed to convert a number of bytes to a readable string that represents the number of kilobytes, megabytes or gigabytes.
I created an extension method for [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/znEU9SwIi6A" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/10/21/convert-file-size-bytes-to-megabytegigabyte-string-using-c/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/10/21/convert-file-size-bytes-to-megabytegigabyte-string-using-c/</feedburner:origLink></item>
		<item>
		<title>Linq Tutorial – Using the Enumerable.Any extension method</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/73Z2vK8I9Bc/</link>
		<comments>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 00:18:21 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[enumerable]]></category>
		<category><![CDATA[enumerable.all]]></category>
		<category><![CDATA[extension methods]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=266</guid>
		<description>Consider the following:

Using Linq I want to select all the roles for a particular user.  I could create a query like this:


public List&amp;#60;Role&amp;#62; GetByUserID(int userID)
{
    List&amp;#60;Role&amp;#62; roles = (from r in Context.Roles
                    [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/73Z2vK8I9Bc" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/</feedburner:origLink></item>
		<item>
		<title>Linq to SQL – Using EntitySet.Remove to delete records</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/JdgXAMH8ntw/</link>
		<comments>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 04:04:22 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[DeleteOnNull]]></category>
		<category><![CDATA[DMBL]]></category>
		<category><![CDATA[EntitySet]]></category>
		<category><![CDATA[EntitySet.Remove]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=256</guid>
		<description>Download source
Quite often you have two tables with a linker table which causes Linq to SQL to generate an EntitySet of the related records in each table.
Take the following example:

Here, the User entity will have an EntitySet called UserRoles containing the Role entities that the user is part of.
When I want to remove a role from a user [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/JdgXAMH8ntw" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/</feedburner:origLink></item>
		<item>
		<title>Using FindControl for a control in the ItemTemplate of a ListView</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/pJ5mj1SCKFQ/</link>
		<comments>http://www.joe-stevens.com/2009/09/18/using-findcontrol-for-a-control-in-the-itemtemplate-of-a-listview/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 01:09:21 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[findcontrol]]></category>
		<category><![CDATA[itemtemplate]]></category>
		<category><![CDATA[listview]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=252</guid>
		<description>I&amp;#8217;ve been playing around with the ListView control recently and am quite impressed with it.  I like how it gives full control over the markup used as apposed to the other data driven controls.
I came across an issue where in my ItemTemplate I have a CheckBoxList which I needed to reference when I hit a button [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/pJ5mj1SCKFQ" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/18/using-findcontrol-for-a-control-in-the-itemtemplate-of-a-listview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/09/18/using-findcontrol-for-a-control-in-the-itemtemplate-of-a-listview/</feedburner:origLink></item>
		<item>
		<title>Control.TryFindControl Extension Method</title>
		<link>http://feedproxy.google.com/~r/JoeStevensBlog/~3/Gctt9qOH7Ug/</link>
		<comments>http://www.joe-stevens.com/2009/09/15/control-tryfindcontrol-extension-method/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:46:14 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[extension method]]></category>
		<category><![CDATA[TryFindControl]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=247</guid>
		<description>Following on from my last post creating an extension method to use FindControl recursively I thought it would be cool to also have a TryFindControl method which works in a similar way to Int32.TryParse which I use regularly.
Below is a generic extension method that uses my previously created recursive FindControl method to cast the object to [...]&lt;img src="http://feeds.feedburner.com/~r/JoeStevensBlog/~4/Gctt9qOH7Ug" height="1" width="1"/&gt;</description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/15/control-tryfindcontrol-extension-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.joe-stevens.com/2009/09/15/control-tryfindcontrol-extension-method/</feedburner:origLink></item>
	</channel>
</rss>
