<?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/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DkAGQno9cCp7ImA9WhRRFEk.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026</id><updated>2011-11-28T01:45:23.468Z</updated><category term="GotConnection" /><category term="Resharper" /><category term="Disc Golf" /><category term="F1" /><category term="Visual Studio" /><category term="Twitter" /><category term="CodeSpaces.com-Git" /><category term="Team Foundation Server" /><category term="Running" /><category term="Wcf" /><category term="Wedding" /><category term="You know when ..." /><category term="XKCD" /><category term="Christmas" /><category term="Review" /><category term="Geek" /><category term="Beer Free" /><category term="Windows Live Writer" /><category term="Asp.Net MVC" /><category term="IIS" /><category term="Challenge" /><category term="C# 3.0" /><category term="Bad Jokes" /><category term="Code" /><category term="BDGA - DoC" /><category term="Gym" /><category term="Git" /><category term="General" /><category term="Backup" /><category term="Geek Humour" /><category term="Extension Methods" /><category term="Unit test" /><category term="First Thousand Beers" /><category term="Rant" /><category term="Spam" /><category term="Github" /><category term="Car" /><category term="svn" /><category term="US Presidential Race '08" /><category term="Windows 7" /><title>West's Ramblings</title><subtitle type="html">Techy, Geeky, Disc Golfy</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://westdiscgolf.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>153</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/WestDiscGolf" /><feedburner:info uri="westdiscgolf" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkQBRHwyfip7ImA9WhRTFU8.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-7151490219216680102</id><published>2011-11-05T19:12:00.001Z</published><updated>2011-11-05T19:12:35.296Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T19:12:35.296Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Git" /><category scheme="http://www.blogger.com/atom/ns#" term="CodeSpaces.com-Git" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Working with a Codespaces.com Git repository on Windows–Pulling your code</title><content type="html">&lt;p&gt;This post is third part of a mini series which I have written to aid in setting up and using your Codespaces.com Git repository remotely on Windows. Links to the previous posts in the series can be found below.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_05.html" target="_blank"&gt;Getting started; setting up your SSH Public Key&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_8164.html" target="_blank"&gt;Pushing your code into the hosted repository&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Pulling your code from the hosted repository (this article) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Compared to the previous steps in this series this is relatively straight forward however was the more complicated to work out.&lt;/p&gt;  &lt;h2&gt;Pulling from your remote repository&lt;/h2&gt;  &lt;p&gt;First off create the new folder where the local repository is going to be located. Once the new folder has been created right click on the folder and select “Git GUI here”.&lt;/p&gt;  &lt;p&gt;In the resulting dialog select the “Create New Repository” option as seen below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-is2N3_-YuHM/TrWKl_5ATgI/AAAAAAAAALs/gaj46wFwvyU/s1600-h/image%25255B9%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-ONp7geZLN24/TrWKmoR4AmI/AAAAAAAAAL0/WVSCZ5VQOng/image_thumb%25255B3%25255D.png?imgmax=800" width="462" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When prompted select the new folder which you’ve just created as to where the new repository is going to be created. I found the selection process would automatically select the folder you had right clicked on when selecting the browse option but check. Once successful this will fire up the Git GUI which we were using in the previous post.&lt;/p&gt;  &lt;p&gt;At this point we need to drop to the Git bash command line. It has something to do with wanting to make sure people are using Pull correctly and so is not possible through the GUI as far as I could find.&lt;/p&gt;  &lt;p&gt;Fire up a Git Bash shell instance. You can either do this by clicking on the shortcut, finding the program in the Start menu or right clicking on a folder and selecting “Git bash here”.&lt;/p&gt;  &lt;p&gt;Once this is started make sure you at the correct location. If you are not in the required folder it can be easily remedied by using the command “cd” followed by the location of the folder you have just created. As this is a linux/unix type shell running in windows it doesn’t understand “c:\” so to change the path to “c:\src\folder\trunk” you will need to type:&lt;/p&gt;  &lt;p align="center"&gt;cd /c/src/folder/trunk&lt;/p&gt;  &lt;p&gt;Once you have navigated to desired folder location then you need to type the following command:&lt;/p&gt;  &lt;p align="center"&gt;git pull &lt;a href="mailto:git@codespaces.com:username/gitrepository"&gt;git@codespaces.com:username/gitrepository&lt;/a&gt; HEAD&lt;/p&gt;  &lt;p&gt;Replacing the username with your own username and gitrepository with the desired git repository name.&lt;/p&gt;  &lt;p&gt;On executing the command it will prompt you for your passphrase. Don’t be alarmed if nothing gets displayed on the screen this is just how this shell works for security. If you type it incorrectly it will ask you again. If at any point you want to stop the command start again you can press “ctrl+c” and it will cancel.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-VCEbmrEoNfo/TrWKnflHB7I/AAAAAAAAAL8/cGmKNS1MIfg/s1600-h/image%25255B15%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-pVxef3eccxA/TrWKocrMV5I/AAAAAAAAAME/RkY5n2-yVXI/image_thumb%25255B7%25255D.png?imgmax=800" width="450" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you have entered your passphrase correctly it will contact the remote repository. The bash shell will then display something similar to the above logging the actions of which it is performing.&lt;/p&gt;  &lt;p&gt;Once it has finished performing this action you can browse to your new folder you have created and will have the code in place ready to edit again.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;In this post we have setup a new local repository to mimic computer move or hard drive failure and pulled the latest code from the master branch of our Codespaces.com remote git&amp;#160; repository into our newly created local repository.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-7151490219216680102?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DYJ-I-ZBUGPRpvcg6GjtM2wGj-E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DYJ-I-ZBUGPRpvcg6GjtM2wGj-E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DYJ-I-ZBUGPRpvcg6GjtM2wGj-E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DYJ-I-ZBUGPRpvcg6GjtM2wGj-E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/11QNPYnNZYQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/7151490219216680102/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=7151490219216680102" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7151490219216680102?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7151490219216680102?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/11QNPYnNZYQ/working-with-codespacescom-git_461.html" title="Working with a Codespaces.com Git repository on Windows–Pulling your code" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-ONp7geZLN24/TrWKmoR4AmI/AAAAAAAAAL0/WVSCZ5VQOng/s72-c/image_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_461.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMFRng7eip7ImA9WhRTFU8.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-6691366806622232348</id><published>2011-11-05T18:35:00.001Z</published><updated>2011-11-05T19:13:37.602Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T19:13:37.602Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Git" /><category scheme="http://www.blogger.com/atom/ns#" term="CodeSpaces.com-Git" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Working with a Codespaces.com Git repository on Windows–Pushing your code remotely</title><content type="html">&lt;p&gt;This post is the second part of a mini series which I have written to aid in setting up and using your &lt;a href="http://www.codespaces.com" target="_blank"&gt;Codespaces.com&lt;/a&gt; Git repository remotely on Windows.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_05.html" target="_blank"&gt;Getting started; setting up your SSH Public Key&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Pushing your code into the hosted repository (this article) &lt;/li&gt;    &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_461.html" target="_blank"&gt;Pulling your code from the hosted repository&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Pushing to your remote repository&lt;/h2&gt;  &lt;p&gt;The first step to pushing your code into a remote repository is to create one in your Codespaces.com &lt;strong&gt;Admin&lt;/strong&gt; section. You will find a settings area where you administer your users, projects, repositories and backups.&lt;/p&gt;  &lt;p&gt;Once here click on the ribbon button to create a new Git repository.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-H1OOAHeVl1Y/TrWB0IPrJ9I/AAAAAAAAAJY/az0-IOB0K1E/s1600-h/image12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-rzjkKqRL4U0/TrWB0zPzLcI/AAAAAAAAAJg/FRgBQATiXdg/image_thumb6.png?imgmax=800" width="322" height="106" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A dialog will appear asking for information about the new Git repository. Fill in all the details which the required taking note of the name of the repository as this will be required later.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-rC8tGacdhR8/TrWB1T4m3aI/AAAAAAAAAJo/MF5ERTJD9JA/s1600-h/image%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-xIjA7cIivSk/TrWB2VxIVCI/AAAAAAAAAJw/FHxxl4bA99I/image_thumb%25255B1%25255D.png?imgmax=800" width="400" height="369" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m using a code project which was originally posted on Github for some example code to post.&lt;/p&gt;  &lt;p&gt;Once the information has been filled in click “Save” and your new repository should appear in the list on the right hand side. If this doesn’t automatically appear then select the “Git Repositories” option from the “Settings” tree view on the left and it will refresh the list and should now appear.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-eodeAmAkiks/TrWB23idP-I/AAAAAAAAAJ4/AFp77NGS8h4/s1600-h/image16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-eME7DqqHaek/TrWB3oKzsTI/AAAAAAAAAKA/hKCrr-p37Zg/image_thumb8.png?imgmax=800" width="322" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If there is a notification of failure or you are unable to see the repository in the list then try again. If this continues to be unsuccessful then contact Codespaces.com support.&lt;/p&gt;  &lt;p&gt;If you now navigate to the “Source Code” tab and select the newly created repository from the dropdown you will see that it has been created but there are no folders in it yet. It will display a folder called “Empty Repository” however this is not a real folder and will disappear once you have submitted some code to it.&lt;/p&gt;  &lt;p&gt;The repository has been created and you will be given a url on which you can access it by. It will be in the format of:&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="mailto:git@codespaces.com:username/repositoryname"&gt;git@codespaces.com:username/repositoryname&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please replace username and repositoryname as required with your specified credentials. These can be found next to the branches dropdown list on the “Source Code” tab.&lt;/p&gt;  &lt;h2&gt;Getting Git Working&lt;/h2&gt;  &lt;p&gt;The next step is to get Git, which has been installed on your computer, talking to the remote repository we’ve just created and to push the code into it.&lt;/p&gt;  &lt;p&gt;Find the folder where your code is. This will be where you already have an established local repository where you have been committing changes to for a while. Right click on this folder and click “Git GUI here”. This will fire up the Git GUI at this location.&lt;/p&gt;  &lt;p&gt;At this point Git locally doesn’t know about the remote location so we need to add the information into the system. Click the “remote” option in the tool bar and “Add …”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-wsxlcs08a38/TrWB442UYGI/AAAAAAAAAKI/UOBzNCwBk4c/s1600-h/image%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-xddjmYbHzLA/TrWB5hpSjhI/AAAAAAAAAKQ/OGTzY6WDsRk/image_thumb%25255B3%25255D.png?imgmax=800" width="343" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Fill in the required fields making use of the url which was created earlier when initialising the repository. Select the “Do Nothing Else Now” option as we will perform the Push in a minute.&lt;/p&gt;  &lt;p&gt;Once you are happy with the information click “Add”. Now go back to the Git GUI and re-select the “remote” option in the tool bar. You will be presented with more options now a remote connection has been setup.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-dl8JguLaCvk/TrWB6RHj8PI/AAAAAAAAAKU/KOEf2O7agRg/s1600-h/image36.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-Um-4mlYA-2M/TrWB690n2nI/AAAAAAAAAKg/41QfEF6nA5w/image_thumb18.png?imgmax=800" width="109" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the main window click “Push” from the list of action buttons which appear towards the bottom of the screen. In the dialog which appears select the correct remote destination repository. This dropdown will only have the remote location you just entered unless an additional location had already been setup.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-KeXUi2xenSQ/TrWB7gteTBI/AAAAAAAAAKo/Ig9PCsqSc7A/s1600-h/image41.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-nNZxqC9sy4c/TrWB8XHlhYI/AAAAAAAAAKw/qVsLwLxfzz0/image_thumb21.png?imgmax=800" width="386" height="391" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are a number of options here which you can select. You may need to Force the overwrite of the existing branch if you are working with an old branch you want to re-use or if something has gone wrong earlier. Finally click “Push”.&lt;/p&gt;  &lt;p&gt;A new dialog will appear and it will inform you that it is pushing the code to the repository and sit there for a few seconds.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-iHkvuJ9gTKI/TrWB8_djEgI/AAAAAAAAAK4/dykcU_7hMjo/s1600-h/image%25255B12%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-exf-YPk-T_M/TrWB97KCtbI/AAAAAAAAALA/Gc2Pt1b1KuY/image_thumb%25255B6%25255D.png?imgmax=800" width="550" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point it another window will prompt you for your passphrase you created in the first part of the series and click ok.&lt;/p&gt;  &lt;p&gt;If everything went well you will get a big green success bar displayed.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-MeIWdJJ51RU/TrWB-qi7IpI/AAAAAAAAALI/baOf7azDBbM/s1600-h/image%25255B16%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/--dOcctOWK9E/TrWB_tTqyOI/AAAAAAAAALQ/G_Kxo_yGyp4/image_thumb%25255B8%25255D.png?imgmax=800" width="556" height="268" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now to check that it worked we want to check the remote repository. Navigate back to the “Source Code” tab in your Codespaces.com dashboard and refresh your repository listing.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-wijll6_tW-0/TrWCAWMnj-I/AAAAAAAAALY/cYP7ZVedDc4/s1600-h/image%25255B20%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-1e0MvAWQ6bY/TrWCBD6PdjI/AAAAAAAAALg/RcN7bYt63so/image_thumb%25255B10%25255D.png?imgmax=800" width="544" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You will find that the “Empty Repository” folder which was there earlier has now disappeared and been replaced with your committed code. You can now browse the code online through this web application view.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;In this post we have created our remote Git repository in our Codespaces.com account and pushed up the content of our local Git repository using the Git GUI.&lt;/p&gt;  &lt;p&gt;Next time we’ll be pulling the remote repository code down onto our development system in a brand new local repository to replicate hard drive failure or a multi development machine environment.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-6691366806622232348?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a0swl61uQoQu3XOPSEah2iGFyRs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a0swl61uQoQu3XOPSEah2iGFyRs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a0swl61uQoQu3XOPSEah2iGFyRs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a0swl61uQoQu3XOPSEah2iGFyRs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/t6BQRbxQMGY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/6691366806622232348/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=6691366806622232348" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6691366806622232348?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6691366806622232348?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/t6BQRbxQMGY/working-with-codespacescom-git_8164.html" title="Working with a Codespaces.com Git repository on Windows–Pushing your code remotely" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-rzjkKqRL4U0/TrWB0zPzLcI/AAAAAAAAAJg/FRgBQATiXdg/s72-c/image_thumb6.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_8164.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUAQXcyeSp7ImA9WhRTFUw.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-3143705743669283071</id><published>2011-11-05T18:09:00.001Z</published><updated>2011-11-05T18:37:20.991Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T18:37:20.991Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Git" /><category scheme="http://www.blogger.com/atom/ns#" term="CodeSpaces.com-Git" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Working with a Codespaces.com Git repository on Windows–SSH Key setup</title><content type="html">&lt;p&gt;This post is the first part of a mini series which I have written to aid in setting up and using your Codespaces.com Git repository remotely on Windows.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Getting started; setting up your SSH Public Key (this article) &lt;/li&gt;    &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_8164.html" target="_blank"&gt;Pushing your code into the hosted repository&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Pulling your code from the hosted repository &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Getting started&lt;/h2&gt;  &lt;ol&gt;&lt;!--EndFragment--&gt;&lt;/ol&gt;  &lt;p&gt;To start off you need to download and install &lt;a href="http://code.google.com/p/msysgit/" target="_blank"&gt;msysgit&lt;/a&gt; which will give you the basics; make sure you include the “Git bash” and “Git Gui” options during the installation.&lt;/p&gt;  &lt;h2&gt;SSH key creation&lt;/h2&gt;  &lt;p&gt;First step to working with Codespaces repositories, or any remote git repositories, is to create a ssh key. This is done by using the git bash shell. The shortcut looks like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-1R71cncCj9w/TrV7vK7czSI/AAAAAAAAAIE/f6gKXNNfB20/s1600-h/image2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-VSD3pDrn0ok/TrV7v9e8glI/AAAAAAAAAIM/Y8VYFQr4awk/image_thumb.png?imgmax=800" width="62" height="78" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the bash shell has loaded you will be presented with a command line interface similar to a linux/unix command line.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-CFe2F8oj8i4/TrV7wp0yB6I/AAAAAAAAAIQ/0N0wk0_hbaM/s1600-h/image6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-8bUhqvhxcyo/TrV7xc5coMI/AAAAAAAAAIc/P0GdhegJ7vE/image_thumb2.png?imgmax=800" width="473" height="121" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Type ‘ssh-keygen’ and something similar to the following will appear. Leave it with the default locations as this will aid in locating the files later.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-_lY5KbllNLE/TrV7zPZk0tI/AAAAAAAAAIk/6G2IIj8tEVo/s1600-h/image10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-L_5KpmdaDm8/TrV7zlgq0MI/AAAAAAAAAIo/d8NzQIojtGE/image_thumb4.png?imgmax=800" width="482" height="70" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The process will ask you for your passphrase. Remember this as you will be prompted for it every time you want to perform actions on the remote repository.&lt;/p&gt;  &lt;p&gt;Once the file is created you will be returned to the command prompt. At this point locate the file in the location where it was originally specified - in my case c:\users\west\.ssh - and you will find two files; “id_rsa” and “id_rsa.pub”.&lt;/p&gt;  &lt;p&gt;Open the id_rsa.pub file in notepad (other plain text editors are available) and minimise as you will need this in a few minutes.&lt;/p&gt;  &lt;p&gt;Log into your Codespaces.com dashboard and navigate to “My Profile” and then “SSH Keys”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-Mmvn5aT4QV4/TrV70CCHBII/AAAAAAAAAIw/VCYaMbmO3K0/s1600-h/image14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-lyLpujrpXrg/TrV7016TsqI/AAAAAAAAAI8/mNShQCxIzNk/image_thumb6.png?imgmax=800" width="553" height="144" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is where you will need the notepad instance you minimised earlier. Copy the contents of the file and paste into the “Key Value” text box. Set the value of the “Key Name” to something appropriate; for this example I have called it “Public”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-sgb86KH3kmQ/TrV71rGVh8I/AAAAAAAAAJA/fQylV2edCOg/s1600-h/image19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-5C-E3YG68MM/TrV72P2Z_ZI/AAAAAAAAAJM/LRIhPhMkccM/image_thumb9.png?imgmax=800" width="357" height="194" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One thing to note, make sure you remove any additional carriage returns from the end of the key value entered value. Once you are happy with this click “Add Key”. If this has been saved successfully you will be notified and the key will be listed on the right hand side.&lt;/p&gt;  &lt;p&gt;This action will have performed what you need for encryption keys to allow access between your computer and remote Codespace repository. Please keep the keys safe and secure as you don’t want any unauthorised people getting access.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;In this post we have created our ssh keys and added them to our Codespaces.com account information to allow for remote access.&lt;/p&gt;  &lt;p&gt;Next time we’ll be pushing our local repository code into the remote repository.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-3143705743669283071?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/M2ErXDuf9Za_TEpRBdns6TG1iJg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M2ErXDuf9Za_TEpRBdns6TG1iJg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/M2ErXDuf9Za_TEpRBdns6TG1iJg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/M2ErXDuf9Za_TEpRBdns6TG1iJg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/xnuzVoNdnYA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/3143705743669283071/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=3143705743669283071" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3143705743669283071?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3143705743669283071?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/xnuzVoNdnYA/working-with-codespacescom-git_05.html" title="Working with a Codespaces.com Git repository on Windows–SSH Key setup" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-VSD3pDrn0ok/TrV7v9e8glI/AAAAAAAAAIM/Y8VYFQr4awk/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_05.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMHR3c9eip7ImA9WhRTFU8.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-6852896065133197680</id><published>2011-11-05T18:02:00.000Z</published><updated>2011-11-05T19:13:56.962Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-05T19:13:56.962Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Git" /><category scheme="http://www.blogger.com/atom/ns#" term="CodeSpaces.com-Git" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Working with a Codespaces.com Git repository on Windows–Mini series</title><content type="html">&lt;p&gt;I have been working on my personal development projects in local git repositories for a while now and wanted to get them into my &lt;a href="http://www.Codespaces.com" target="_blank"&gt;Codespaces.com&lt;/a&gt; remote git repositories for backup. Its fine having source control locally but no help if the hard drive ever failed.&lt;/p&gt;  &lt;p&gt;On doing some research on the internet I found there was almost nothing on getting setup with Windows and Git on Codespaces.com so I have put together this mini series of posts to aid others in doing so. The information in these posts are the processes I went through with getting setup so I hope they will help others.&lt;/p&gt;  &lt;p&gt;In this series I’ve broken it down into three main aspects which you need to do when using Git and Codespaces.com.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_05.html" target="_blank"&gt;Getting started; setting up your SSH Public Key&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_8164.html" target="_blank"&gt;Pushing your code into the hosted repository&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git_461.html" target="_blank"&gt;Pulling your code from the hosted repository&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;This series is not a how to for Git usage as there are many of those out there and I have found the following links below helpful.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www-cs-students.stanford.edu/~blynn/gitmagic/ch03.html"&gt;http://www-cs-students.stanford.edu/~blynn/gitmagic/ch03.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://nathanj.github.com/gitguide/tour.html"&gt;http://nathanj.github.com/gitguide/tour.html&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/3418498436020656026-6852896065133197680?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1hF0eHjreGaIALTvPF7sGmy3lWU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1hF0eHjreGaIALTvPF7sGmy3lWU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1hF0eHjreGaIALTvPF7sGmy3lWU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1hF0eHjreGaIALTvPF7sGmy3lWU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/0bF0nxvnfWs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/6852896065133197680/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=6852896065133197680" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6852896065133197680?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6852896065133197680?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/0bF0nxvnfWs/working-with-codespacescom-git.html" title="Working with a Codespaces.com Git repository on Windows–Mini series" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/11/working-with-codespacescom-git.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EERng4eCp7ImA9WhdTGE4.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-2467563343182067344</id><published>2011-07-16T17:53:00.001+01:00</published><updated>2011-07-16T18:00:07.630+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-16T18:00:07.630+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Github" /><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Asp.net MVC 3 / Razor – Using the same view through regular action and Ajax loading</title><content type="html">&lt;p&gt;Ever had a view which you wanted to reuse and load through a regular action call or through using the action using a JavaScript call but then it loads in the associated layout multiple times? I had this exact issue recently.&lt;/p&gt;  &lt;p&gt;And the solution; in the _ViewStart.cshtml file which specifies the default layout replace:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;@{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Layout = &amp;quot;~/Views/Shared/_Layout.cshtml&amp;quot;;      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;with&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;@{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Layout = Request.IsAjaxRequest() ? null : &amp;quot;~/Views/Shared/_Layout.cshtml&amp;quot;;      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Then in the controllers actions they still continue to return the same view but don’t have any layout associated to it. This could be used to add a specific “ajax” layout instead of none.&lt;/p&gt;  &lt;p&gt;Sample project can be found on &lt;a href="https://github.com/WestDiscGolf/ViewMultiUse" target="_blank"&gt;github&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/3418498436020656026-2467563343182067344?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/46AcKasuuJ0lHgnB3jjs9UKbGKY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/46AcKasuuJ0lHgnB3jjs9UKbGKY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/46AcKasuuJ0lHgnB3jjs9UKbGKY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/46AcKasuuJ0lHgnB3jjs9UKbGKY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/uolgmp_g_Lk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/2467563343182067344/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=2467563343182067344" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/2467563343182067344?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/2467563343182067344?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/uolgmp_g_Lk/aspnet-mvc-3-razor-using-same-view.html" title="Asp.net MVC 3 / Razor – Using the same view through regular action and Ajax loading" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/07/aspnet-mvc-3-razor-using-same-view.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EFRHc_fCp7ImA9WhZVFkw.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-3000362880434391296</id><published>2011-05-28T20:40:00.001+01:00</published><updated>2011-05-28T20:40:15.944+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-28T20:40:15.944+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Asp.net Mvc 3, Razor and RenderAction</title><content type="html">&lt;p&gt;When playing with the Razor syntax for view creation in Asp.net MVC you need to remember its not quite a direct translation between it and the web forms view engine and &lt;strong&gt;it is&lt;/strong&gt; a different syntax. I was frustrated by it earlier in the week and without internet connection continued couldn’t resolve it instantly. It comes down to the syntactic sugar which Razor gives you.&lt;/p&gt;  &lt;p&gt;When it comes to methods on the Html helper you can’t use the syntactic sugar by itself you do need to give Razor some parentheses.&lt;/p&gt;  &lt;p&gt;Web forms view engine:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&amp;lt;% Html.RenderAction(&amp;quot;About&amp;quot;); %&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Razor view engine:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;@{ Html.RenderAction(&amp;quot;About&amp;quot;); }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;not &lt;font face="Consolas"&gt;@Html.RenderAction(&amp;quot;About&amp;quot;)&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-3000362880434391296?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/t17hQnWj7LovhvYKNQGaSlW6-ho/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t17hQnWj7LovhvYKNQGaSlW6-ho/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/t17hQnWj7LovhvYKNQGaSlW6-ho/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/t17hQnWj7LovhvYKNQGaSlW6-ho/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/vYcohDlb_7c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/3000362880434391296/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=3000362880434391296" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3000362880434391296?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3000362880434391296?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/vYcohDlb_7c/aspnet-mvc-3-razor-and-renderaction.html" title="Asp.net Mvc 3, Razor and RenderAction" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/05/aspnet-mvc-3-razor-and-renderaction.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIASH04fCp7ImA9WhZVFEk.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-3448621884926788070</id><published>2011-05-26T21:09:00.001+01:00</published><updated>2011-05-26T21:09:09.334+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-26T21:09:09.334+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Github" /><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="GotConnection" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>GotConnection v0.2</title><content type="html">&lt;p&gt;There are a few changes and tweaks from v0.1 in this release. It was after a mini code review by my mate &lt;a href="http://twitter.com/willtheguvnor" target="_blank"&gt;Will&lt;/a&gt; who had some suggestions on the connectivity testing which I have incorporated. I’ve also updated the way the options can be passed in to closer match the original way I wanted it to work.&lt;/p&gt;  &lt;h3&gt;Update to connectivity testing&lt;/h3&gt;  &lt;p&gt;Instead of specifying if you are connected or not this release has been updated to try and connect automatically and if no connection is available then use the in development settings. When you go live this can be turned off so if there is an issue with Twitter in a production environment it will return an empty string. This will need to tested for in the consuming code but a small price to pay for testing connectivity. This is driven by a configuration switch:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&amp;lt;add key=&amp;quot;GotConnection.Twitter.InDevelopment&amp;quot; value=&amp;quot;true&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;While testing the code the request for data from Twitter is relatively speedy so putting this functionality into a try/catch didn’t feel like a bad thing.&lt;/p&gt;  &lt;h3&gt;Update usage&lt;/h3&gt;  &lt;p&gt;The original plan was to allow the options to be specified with an anonymous object in much the same way in which you can override defaults in jQuery functions by passing in a json object. This release has now been updated to allow for this for the same options as in v0.1. I will look to expand to the rest of the &lt;a href="http://dev.twitter.com/doc/get/statuses/user_timeline" target="_blank"&gt;Twitter API Timeline&lt;/a&gt; options in later releases.&lt;/p&gt;  &lt;h4&gt;Using default options:&lt;/h4&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;GotConnection.ITwitter twitter = GotConnection.ConnectTo.Twitter();      &lt;br /&gt;var result = twitter.TimeLine(&amp;quot;WestDiscGolf&amp;quot;);&lt;/font&gt;&lt;/p&gt;  &lt;h5&gt;Specify options:&lt;/h5&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;GotConnection.ITwitter twitter = GotConnection.ConnectTo.Twitter();      &lt;br /&gt;var result = twitter.TimeLine(&amp;quot;WestDiscGolf&amp;quot;, new { count = 5 });&lt;/font&gt;&lt;/p&gt;  &lt;h5&gt;Valid options:&lt;/h5&gt;  &lt;p&gt;format = Defines the format in which you want the result to return. The limitation is still currently only json for offline development; default = json.&lt;/p&gt;  &lt;p&gt;count = Defines the number of status records to return in the call; default = 5&lt;/p&gt;  &lt;p&gt;include_rts = Specifies if native retweets should be returned in the number of status updates returned; default = true.&lt;/p&gt;  &lt;h3&gt;Released&lt;/h3&gt;  &lt;p&gt;The updated code can be found on &lt;a href="https://github.com/WestDiscGolf/GotConnection" target="_blank"&gt;github&lt;/a&gt;. As always any questions or suggestions then please let me know. Also if anyone does find this useful then please let me know if you’re using it and what for.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-3448621884926788070?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0m52BFfG5PXIiXkTFwBz-OQ2sBI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0m52BFfG5PXIiXkTFwBz-OQ2sBI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0m52BFfG5PXIiXkTFwBz-OQ2sBI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0m52BFfG5PXIiXkTFwBz-OQ2sBI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/BMnZdqjYK4Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/3448621884926788070/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=3448621884926788070" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3448621884926788070?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3448621884926788070?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/BMnZdqjYK4Q/gotconnection-v02.html" title="GotConnection v0.2" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/05/gotconnection-v02.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EERno9fyp7ImA9WhZVEUo.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-5577423830535124117</id><published>2011-05-23T19:33:00.001+01:00</published><updated>2011-05-23T19:33:27.467+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T19:33:27.467+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Github" /><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="GotConnection" /><category scheme="http://www.blogger.com/atom/ns#" term="Twitter" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>GotConnection v0.1</title><content type="html">&lt;p&gt;As crazy as it sounds with the amount of connectivity out in the wild these days there are still times when you need to do web based development when you’re not connected to the internet. This in itself isn’t usually an issue except for when you’re developing some web service integrations eg. a Twitter feed integration in a website and have no way of accessing the Twitter API. This has been the main inspiration behind this little project as I’m disconnected from the outside world for a couple of hours a day on my commute to and from work and sometimes I want to integrate with Twitter.&lt;/p&gt;  &lt;p&gt;So I present GotConnection v0.1.&lt;/p&gt;  &lt;h3&gt;“How do I use it?”&lt;/h3&gt;  &lt;p&gt;The concept is pretty simple. You include the library into your asp.net web forms or asp.net MVC or any .net project and where you would write the code to create the web request to extract out the json from Twitter service server side you do this instead …&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;ITwitter twitter = GotConnection.ConnectTo.Twitter(new { option = “blah” });      &lt;br /&gt;var result = twitter.TimeLine(“WestDiscGolf”, 3);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The result returned is the json representation of the timeline data for &lt;a href="http://www.twitter.com/westdiscgolf" target="_blank"&gt;WestDiscGolf&lt;/a&gt; and the last 3 tweets. Simples.&lt;/p&gt;  &lt;p&gt;The interesting part comes when you are working offline and have no access to the internet. To continue to develop against the returned json data you don’t need to do any testing in code, or change any of your consuming code at all. All you need to do is update an application setting in the projects web.config file to say that the component isn’t online anymore. And that’s it.&lt;/p&gt;  &lt;h3&gt;Limitations&lt;/h3&gt;  &lt;p&gt;The only feature at the moment is the ability to get a users timeline in json format from the Twitter API. This is mainly because this is the only functionality that I require at the moment. The offline data understands the number of tweets to return, but in this version that’s it.&lt;/p&gt;  &lt;h3&gt;Future versions&lt;/h3&gt;  &lt;p&gt;I’d like to expand this project to allow for more options in the Twitter time line functionality, including support for the different formats it can return. I’d like to expand it out to other services which have read only data feeds such as blogger, facebook, generic rss/atom feeds etc. Future versions will use the Options class further. The idea behind the Options class is to allow for passing in options/defaults through as an anonymous object much like jquery defaults are set.&lt;/p&gt;  &lt;p&gt;I’m not interested in making this a component which becomes a library to log in/out, post etc. to services such as Twitter as there are many out there already. This is purely there for developing against a read only service when you’re not online.&lt;/p&gt;  &lt;h3&gt;Where can I get it?&lt;/h3&gt;  &lt;p&gt;Well it is up on &lt;a href="https://github.com/WestDiscGolf/GotConnection" target="_blank"&gt;github&lt;/a&gt;. This is the first time I’ve uploaded any of my code to github so feel free to look around, fork the code and change it all, add in extras etc. If you do find this useful and add any extras in then please let me know and I’ll see about adding them into the main fork. Probably in the next version or 2 I’ll look at putting it on NuGet but will have to wait and see.&lt;/p&gt;  &lt;p&gt;Any questions or issues or ideas or comments then please tweet me &lt;a href="http://www.twitter.com/WestDiscGolf" target="_blank"&gt;@WestDiscGolf&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-5577423830535124117?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/abDZwd9iIhkXsqteRmjGIXNl6vg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/abDZwd9iIhkXsqteRmjGIXNl6vg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/abDZwd9iIhkXsqteRmjGIXNl6vg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/abDZwd9iIhkXsqteRmjGIXNl6vg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/UBLhG71XQc8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/5577423830535124117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=5577423830535124117" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5577423830535124117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5577423830535124117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/UBLhG71XQc8/gotconnection-v01.html" title="GotConnection v0.1" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/05/gotconnection-v01.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4EQ3k-eSp7ImA9WhZSEEQ.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-6894420779339737029</id><published>2011-03-25T22:41:00.001Z</published><updated>2011-03-25T22:41:42.751Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-25T22:41:42.751Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Thoughts and Musings about Microsoft WebMatrix</title><content type="html">&lt;p&gt;Webmatrix has been out for a while now and my initial thoughts when it arrived was “why?” and “what does this give you that can’t be done in the free versions of Visual Studio?”. So the only way to answer these questions was to download it and give it a whirl. After confirmation from &lt;a href="http://www.twitter.com/scottgu" target="_blank"&gt;ScottGu&lt;/a&gt; that it can easily co-exist next to Visual Studio (can’t live without it) I took the step and clicked download.&lt;/p&gt;  &lt;p&gt;I’m not going to cover the installation process etc. here as its been covered a number of places and well its an installation process how interested in it are you really? ;-)&lt;/p&gt;  &lt;h4&gt;Initial thoughts&lt;/h4&gt;  &lt;p&gt;On firing up the IDE I was pleasantly surprised by the clean UI. It’s gone down the ribbon route (wouldn’t expect anything less from MS) and fits in well with the new mspaint (in Win 7) and Windows Live Writer to list a couple of applications.&lt;/p&gt;  &lt;p&gt;The first main point that I found was I like the option of testing the sites in a multitude of browsers you have installed on your development machine. From a simple click of the button it will fire up in the specified browser. After issues with Firefox 3 and offline mode when on the commute to work and not working I’ve just tried this in Firefox 4 after upgrading last night and this seems to have been resolved. However, it’d still be nice to be given the option of doing the development in a new instance of the browser so it doesn’t compromise your open tabs if anything went wrong as when you’re on the train to work you can’t get them back until you get to the office.&lt;/p&gt;  &lt;h4&gt;Downsides&lt;/h4&gt;  &lt;p&gt;Being a long time Visual Studio user you will notice a number of problems you will need to get use to quite quickly when using Webmatrix … the biggest issue I was frustrated with was the lack of tooling support for intellisense when writing code in Razor (and other code) files. You could argue that intellisense is a selling point for Visual Studio.&lt;/p&gt;  &lt;p&gt;Ok, so I can live without intellisense, but other tooling which would have been nice would have been support for dragging javascript files from the file listing of the site onto the page and it automatically adds the correct script tag etc. with a path to the script. Is that too much to ask for? This with a combination of lack of intellisense makes it not straight forward to a novice user to add in references without having to go and search for an example on the interweb.&lt;/p&gt;  &lt;p&gt;Another issue, from a Visual Studio user perspective, is that you can’t launch the current site in a browser by hitting f5.&lt;/p&gt;  &lt;h4&gt;Positives&lt;/h4&gt;  &lt;p&gt;Positively I like the support for multiple optional template sites, I like the options where you can download other templates and they’ll essentially just work “out of the box”. This is especially important for novices who don’t know (or care) about sorting out databases or project references etc. to make the thing work. &lt;/p&gt;  &lt;p&gt;The other big thing I like is the integration with Visual Studio which can be done with a simple click of the button. This is a pretty nice way to get around the intellisense issue but also allow for other tooling support you only get from Visual Studio. This makes working on a site between the two IDEs work pretty well and something that the Expression studio people should look into to improve the UX/Dev integration (potentially?).&lt;/p&gt;  &lt;p&gt;However, this nice feature leads me onto the final thoughts …&lt;/p&gt;  &lt;h4&gt;Why bother with Webmatrix?&lt;/h4&gt;  &lt;p&gt;As a professional software developer who spends ~90% of this time using Visual Studio and is use to the shortcuts and using such plugins as Resharper I can’t see me using Webmatrix in anger with anything really, unless for some crazy madness reason I need to do some php *shock* or I need to setup a cms quickly to then load it into Visual Studio to do some monkeying about with it. Just from a pure tooling perspective it wins hands down and its what I’m use to. It might be like using a sledge hammer to put up a picture frame, but if you’re adept at wielding a sledge hammer then it can be used for multiple purposes.&lt;/p&gt;  &lt;p&gt;Let me know your thoughts in the comments below or you can tweet me on &lt;a href="http://www.twitter.com/WestDiscGolf" target="_blank"&gt;@WestDiscGolf&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/3418498436020656026-6894420779339737029?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Fe3gtw-YEtELxht9nSke3psJGH4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Fe3gtw-YEtELxht9nSke3psJGH4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Fe3gtw-YEtELxht9nSke3psJGH4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Fe3gtw-YEtELxht9nSke3psJGH4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/t8wPlq3i5RI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/6894420779339737029/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=6894420779339737029" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6894420779339737029?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6894420779339737029?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/t8wPlq3i5RI/thoughts-and-musings-about-microsoft.html" title="Thoughts and Musings about Microsoft WebMatrix" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/03/thoughts-and-musings-about-microsoft.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcFSH8_eip7ImA9Wx9XGEs.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-5603630806813761714</id><published>2011-01-12T21:00:00.001Z</published><updated>2011-01-12T21:00:19.142Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-12T21:00:19.142Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extension Methods" /><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><title>Asp.net MVC2 + HTML5 data-* attributes</title><content type="html">&lt;p&gt;So you want to add some custom data to a html element to aid your JavaScript development and adding data values to custom attributes is a big no no so what do you do? This is where the new &lt;a href="http://html5doctor.com/html5-custom-data-attributes/" target="_blank"&gt;HTML5 data-*&lt;/a&gt; comes to your rescue.&lt;/p&gt;  &lt;p&gt;The next issue is you can’t use the usual ActionLink method overloads on the html helper as you can’t pass in ‘-‘ into anonymous types because it is a c# reserved character for subtracting!&lt;/p&gt;  &lt;p&gt;So on the train home this evening I came up with the following:&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri"&gt;public static MvcHtmlString ActionLinkHtml5Data(this HtmlHelper htmlHelper, string linkText, string actionName, string controllerName, object routeValues, object htmlAttributes, object htmlDataAttributes)      &lt;br /&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (string.IsNullOrEmpty(linkText))       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; throw new ArgumentException(string.Empty, &amp;quot;linkText&amp;quot;);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri"&gt;&amp;#160;&amp;#160;&amp;#160; var html = new RouteValueDictionary(htmlAttributes);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; var data = new RouteValueDictionary(htmlDataAttributes);&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri"&gt;&amp;#160;&amp;#160;&amp;#160; foreach (var attributes in data)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; html.Add(string.Format(&amp;quot;data-{0}&amp;quot;, attributes.Key), attributes.Value);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri"&gt;&amp;#160;&amp;#160;&amp;#160; return MvcHtmlString.Create(HtmlHelper.GenerateLink(htmlHelper.ViewContext.RequestContext, htmlHelper.RouteCollection, linkText, null, actionName, controllerName, new RouteValueDictionary(routeValues), html));      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And to use it, you already know how to as its the same way as all the other &lt;a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.html.linkextensions.aspx" target="_blank"&gt;ActionLink&lt;/a&gt; overrides which are already available out of the box with an additional parameter which works the same as the htmlattributes parameter.&lt;/p&gt;  &lt;p&gt;&lt;font face="Calibri"&gt;&amp;lt;%: Html.ActionLinkHtml5Data(“link display”, &amp;quot;Action&amp;quot;, &amp;quot;Controller&amp;quot;, new { id = Model.Id }, new { @class=&amp;quot;link&amp;quot; }, new { extra = “some extra info” })&amp;#160; %&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It worked like a dream.&lt;/p&gt;  &lt;p&gt;The issue with the “-“ being reserved has had a work around in MVC 3 by using “_” and then programmatically changing that to being “-“ in the output. I’ve not looked at the implementation but I can’t see how this is much different to what I’ve already achieved simply above.&lt;/p&gt;  &lt;p&gt;Please let me know your thoughts.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-5603630806813761714?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NI7QBHPVClA6zWV6D4u26ljCvXU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NI7QBHPVClA6zWV6D4u26ljCvXU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NI7QBHPVClA6zWV6D4u26ljCvXU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NI7QBHPVClA6zWV6D4u26ljCvXU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/YSAoJqFqDiA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/5603630806813761714/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=5603630806813761714" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5603630806813761714?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5603630806813761714?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/YSAoJqFqDiA/aspnet-mvc2-html5-data-attributes.html" title="Asp.net MVC2 + HTML5 data-* attributes" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2011/01/aspnet-mvc2-html5-data-attributes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04GR3o_fCp7ImA9WxBaE0g.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-5977254067654191956</id><published>2010-03-23T15:56:00.001Z</published><updated>2010-03-23T15:58:46.444Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-23T15:58:46.444Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><title>ASP.net MVC – Exe download and file versioning</title><content type="html">&lt;p&gt;We use an application at work which is supplied as a single exe file which is downloaded from their website. The issue is the file has always been called application.exe irrespective of the version. With each new version it just gets overridden and keeps the same file name.&lt;/p&gt;  &lt;p&gt;We added a request to the manufacturer a request that the file name include the version so we a) know which version we are getting and b) can keep a couple of historical versions locally just in case. However; due to the length of time they have gone for the single filename it is now linked from many different places and they don’t want to break the links.&lt;/p&gt;  &lt;p&gt;It got me thinking, this would be ideal for a route in Asp.Net MVC but can you set the route to accept a string “application.exe” and it do as required. The short answer is yes! :-)&lt;/p&gt;  &lt;p&gt;The thinking was setup the route for the single filename. This would execute an action on a controller which would go off to a repository, find the latest version file and then return the file as a DownloadResult to throw up the save file dialog. I had a hunt round the internet and found an oldish post by &lt;a href="http://haacked.com/archive/2008/05/10/writing-a-custom-file-download-action-result-for-asp.net-mvc.aspx" target="_blank"&gt;Phil Haack&lt;/a&gt; for this kind of thing. I updated it to map to a specific file, for instance on a file share.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:6baff378-eba8-45f3-8dbc-90b314fc7033" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; DownloadResult : ActionResult&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; FileLocation { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; FileName { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; ContentType { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;override&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; ExecuteResult(ControllerContext context)&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (&lt;/span&gt;&lt;span style="color: #000000;"&gt;!&lt;/span&gt;&lt;span style="color: #000000;"&gt;String.IsNullOrEmpty(FileLocation))&lt;br /&gt;        {&lt;br /&gt;            context.HttpContext.Response.AddHeader(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;content-disposition&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;attachment; filename=&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; FileName);&lt;br /&gt;            context.HttpContext.Response.ContentType &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ContentType;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        context.HttpContext.Response.TransmitFile(FileLocation);&lt;br /&gt;    }&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Once you’ve got that sorted all that’s left is to add in the route in your Global.asax …&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:753d8605-cdc9-44f3-8622-1c3154ef469f" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt;routes.MapRoute(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;download&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;application.exe&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;,   &lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; {controller &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Home&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, action &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Download&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;  &lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;And tad ta :-)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The other options would be routing / redirecting at the IIS/Apache level, but as a developer this seemed to be the easiest and simplest way to enable data access to help with new version releases.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-5977254067654191956?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/AoxECNpPaMwh5YNqd-eLtpdY2Pk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AoxECNpPaMwh5YNqd-eLtpdY2Pk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/AoxECNpPaMwh5YNqd-eLtpdY2Pk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/AoxECNpPaMwh5YNqd-eLtpdY2Pk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/jmx22yxitUE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/5977254067654191956/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=5977254067654191956" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5977254067654191956?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5977254067654191956?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/jmx22yxitUE/aspnet-mvc-exe-download-and-file.html" title="ASP.net MVC – Exe download and file versioning" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/03/aspnet-mvc-exe-download-and-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAMQH88fip7ImA9WxBbGEw.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-5928892910885060706</id><published>2010-03-17T09:38:00.001Z</published><updated>2010-03-17T09:39:41.176Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-17T09:39:41.176Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Extension Methods" /><category scheme="http://www.blogger.com/atom/ns#" term="C# 3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>SqlParameterCollection Extension Method AddWithValue</title><content type="html">&lt;p&gt;I don’t know why it’s not included in .net 3.5 / c#3 but the recommended way of adding a SQL Parameter to a SqlParameterCollection is to use the AddWithValue method; however, you can’t specify the SqlDbType with any of the overloads. It’s not hard …&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;div class="csharpcode"&gt;     &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:ae674a4d-dfdd-4a56-84e2-36c6d0684e67" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; DataAccessExtensions&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; AddWithValue specifiying the &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;see cref="SqlDbType"/&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; of the parameter&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;param name="collection"&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;The collection to add the parameter to&lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;param name="parameterName"&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;The name of the parameter&lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;param name="value"&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;The value of the parameter&lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #808080;"&gt;///&lt;/span&gt;&lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;param name="sqlDbType"&amp;gt;&amp;lt;see cref="SqlDbType"/&amp;gt;&lt;/span&gt;&lt;span style="color: #008000;"&gt; which the SqlCommand is expecting for the created parameter&lt;/span&gt;&lt;span style="color: #808080;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;span style="color: #808080;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; AddWithValue(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;this&lt;/span&gt;&lt;span style="color: #000000;"&gt; SqlParameterCollection collection, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; parameterName, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;object&lt;/span&gt;&lt;span style="color: #000000;"&gt; value, SqlDbType sqlDbType)&lt;br /&gt;        {&lt;br /&gt;            var result &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; SqlParameter(parameterName, sqlDbType) { Value &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; value };&lt;br /&gt;            collection.Add(result);&lt;br /&gt;        }&lt;br /&gt;    }&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-5928892910885060706?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QMphwHDNKiiPKINGeI8cj179LDs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QMphwHDNKiiPKINGeI8cj179LDs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QMphwHDNKiiPKINGeI8cj179LDs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QMphwHDNKiiPKINGeI8cj179LDs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/OjNetyM_btA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/5928892910885060706/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=5928892910885060706" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5928892910885060706?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5928892910885060706?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/OjNetyM_btA/sqlparametercollection-extension-method.html" title="SqlParameterCollection Extension Method AddWithValue" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/03/sqlparametercollection-extension-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIGQHs5eCp7ImA9WxBbEkw.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-8329490143254038894</id><published>2010-03-10T10:55:00.001Z</published><updated>2010-03-10T10:55:21.520Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-10T10:55:21.520Z</app:edited><title>Why do you tweet?</title><content type="html">&lt;p&gt;When Twitter came out I didn’t really see the point. As it gained in popularity I still didn’t really see the point; other than using up bandwidth. I’m not a big fan of social networking sites. I hate Facebook for a start. I think the layout is counter productive, it changes too often and generally the “apps” it has are pointless. The only reason why I’m signed up to it is some of my friends seem to have lost the ability to use email, in the traditional sense, and it’s the only way to communicate with them anymore.&lt;/p&gt;  &lt;p&gt;Anyway, I digress …&lt;/p&gt;  &lt;p&gt;After moving jobs back in Oct ‘09 and settling into my new role I started using Asp.Net MVC more as well as other technologies. After reading some of my regular blogs the writers started putting things like “Also follow me on twitter to get up to date posts, thoughts etc.”, so I thought why not; so I signed up.&lt;/p&gt;  &lt;p&gt;The next question which hit me was which client to use? Well due to numerous recommendations from friends I decided to go with TweetDeck. It’s great and does what I want it to! It now just sits in my system tray and pops up every so often with little notes :-)&lt;/p&gt;  &lt;p&gt;So the main reasons why I tweet?&lt;/p&gt;  &lt;p&gt;- To follow some friends   &lt;br /&gt;- To follow .Net bloggers to links, trends etc.    &lt;br /&gt;- To follow Formula 1 people to keep up to date with the goings on in the sport.    &lt;br /&gt;- To follow some diet/health people to help with the WeightWatchers.    &lt;br /&gt;- Following on from the last 3 points I subscribe to a few hashtags (#f1 and #aspnet being a couple) for technology, disc golf, formula 1 and Weight Watchers.&lt;/p&gt;  &lt;p&gt;And thats it!&lt;/p&gt;  &lt;p&gt;I wouldn’t have found a number of blog posts and interesting details without Twitter over the past few months. The other part is the inside information about Formula 1 in the close season which before has not been possible to access, but with more and more drivers and staff using it, it’s been brilliant.&lt;/p&gt;  &lt;p&gt;So if you’ve not thought about it before; Why do you tweet?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-8329490143254038894?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/X5rsk8jR-5dS_FbJslP2U_VmO18/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X5rsk8jR-5dS_FbJslP2U_VmO18/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/X5rsk8jR-5dS_FbJslP2U_VmO18/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/X5rsk8jR-5dS_FbJslP2U_VmO18/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/TnrwT80UUL0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/8329490143254038894/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=8329490143254038894" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8329490143254038894?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8329490143254038894?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/TnrwT80UUL0/why-do-you-tweet.html" title="Why do you tweet?" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/03/why-do-you-tweet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcDR34-eCp7ImA9WxBbEEk.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-6839367399457049687</id><published>2010-03-08T09:21:00.001Z</published><updated>2010-03-08T09:21:16.050Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-08T09:21:16.050Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Running" /><category scheme="http://www.blogger.com/atom/ns#" term="General" /><category scheme="http://www.blogger.com/atom/ns#" term="First Thousand Beers" /><category scheme="http://www.blogger.com/atom/ns#" term="Gym" /><title>February Update - “And the winner is … “</title><content type="html">&lt;p&gt;… beer this month!&lt;/p&gt;  &lt;p&gt;Short update this month;&lt;/p&gt;  &lt;p&gt;- Not much lost    &lt;br /&gt;- Big beer in take as it was a mates Stag do&lt;/p&gt;  &lt;p&gt;Upside; Spring is on it’s way. It’s sunny, although cold, so can go and play disc golf after work. The summer is on it’s way! :-)&lt;/p&gt;  &lt;p&gt;Current weight loss (since Aug ‘09) : 16 1/8lbs&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Current Status&lt;/strong&gt; &lt;strong&gt;:&lt;/strong&gt; &lt;strong&gt;&lt;font color="#ff0000"&gt;Bad&lt;/font&gt;&lt;/strong&gt;! (-97.8)     &lt;br /&gt;Beers: 490 + 37 = 527     &lt;br /&gt;Miles: 183 (gym: 129.5; road: 33) + 7.5 = 190.5     &lt;br /&gt;DG Rounds: 75 + 8 = 83     &lt;br /&gt;Gym visits: 94 + 5 = 99     &lt;br /&gt;Lengths : 56.7 (total: 567)&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;Key&lt;/strong&gt;     &lt;br /&gt;&lt;font color="#00ff40"&gt;&lt;strong&gt;Good&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;gt; Beers     &lt;br /&gt;&lt;strong&gt;Level&lt;/strong&gt; =&amp;gt; Exercise == Beers     &lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Bad&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;lt; Beers&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-6839367399457049687?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GtWTJPtwFM6Avxz6IILEQFjSVqo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GtWTJPtwFM6Avxz6IILEQFjSVqo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GtWTJPtwFM6Avxz6IILEQFjSVqo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GtWTJPtwFM6Avxz6IILEQFjSVqo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/U-qU3TLH9zo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/6839367399457049687/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=6839367399457049687" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6839367399457049687?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/6839367399457049687?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/U-qU3TLH9zo/february-update-and-winner-is.html" title="February Update - “And the winner is … “" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/03/february-update-and-winner-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMNQnYzfyp7ImA9WxBUGE0.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-7328007482571773581</id><published>2010-03-03T15:01:00.001Z</published><updated>2010-03-05T16:44:53.887Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-03-05T16:44:53.887Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Asp.Net MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Asp.net MVC – When to use strongly typed ViewData?</title><content type="html">&lt;p&gt;In short; all of the time unless you have a &lt;strong&gt;*really*&lt;/strong&gt; good reason not to.    &lt;br /&gt;    &lt;br /&gt;With the use of generics being able to specify a strongly typed model per view / partial view is so easy with the baked in functionality in the framework, so why aren’t you using it?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Why?     &lt;br /&gt;      &lt;br /&gt;&lt;/strong&gt;The whole point of MVC is to have control over markup, enable specific routes and reuse existing views / partial views in different locations among others. It’s not to make your life harder than it already is. The underlying issue is if you don’t have the a strongly typed view model for each view then you don’t have confidence in having complete control over it. Throw in a dev team, potentially, changing the same weakly type code and you’re looking for pain.    &lt;br /&gt;    &lt;br /&gt;When you first start looking at examples of MVC applications, you find examples where people start putting in values in to the ViewData dictionary which is available on the views/controllers.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;ViewData[&lt;span class="str"&gt;&amp;quot;MyKey&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;&amp;quot;Some string value&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This uses the weakly typed ViewDataDictionary which can lead to issues with keys not being present, casting it to the wrong type (potentially) and can lead to unnecessary complexity beyond what is required. This can create hard to maintain spaghetti code in the view markup (can anyone say “classic asp 3” ?) … all of which is bad.&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;So are you suggesting a ViewData model class per view?&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/strong&gt;Yes; this is exactly what I’m suggesting. This leads to well structured solutions and keeps the code and views together. This isn’t such a big problem when working on your own, but if you know the system you are writing will be a lot bigger when completed or you work in a bigger team (or both) then it’s better to keep things as simple and clear as possible as early as possible. Set a good foundation to work from.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;So my current Visual Studio project layout looks something similar to this :&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/_bMpk9bZVyqc/S455qVqI3qI/AAAAAAAAAF4/NAWWOxKSDfk/s1600-h/image2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_bMpk9bZVyqc/S455q750lAI/AAAAAAAAAF8/pI8oFFeSSDI/image_thumb.png?imgmax=800" width="212" height="244" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;The view data class definitions and the associated full / partial views are filed away in similar namespaces / folder structures * underneath their associated areas of the solution so that you know which are linked together more easily.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;font size="1"&gt;* The views in this case are filed under Document instead of Documents because of the name of the controller, although are potentially incorrectly named&amp;#160; :-)&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;/font&gt;&lt;strong&gt;Summary&lt;br /&gt;    &lt;br /&gt;&lt;/strong&gt;So to summarise, why do this? Well it helps to know what you’ve got to play with in each view. It breaks down the specifics which you need to pass into a view/partial view to get it to operate nicely. It also means when re-using partial views you know what to pass into them. Also, with strongly typed goodness it helps with refactoring especially when using tools such as &lt;a href="http://www.jetbrains.com/resharper/" target="_blank"&gt;Resharper&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;Let me know your thoughts.&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;strong&gt;Further reading:&lt;br /&gt;    &lt;br /&gt;&lt;/strong&gt;MikesDotNetting - &lt;a href="http://www.mikesdotnetting.com/Article/105/ASP.NET-MVC-Partial-Views-and-Strongly-Typed-Custom-ViewModels" target="_blank"&gt;ASP.NET MVC Partial Views and Strongly Typed Custom ViewModels&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/3418498436020656026-7328007482571773581?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fRyh8G9cR-PTwmb7TlpmlX5kQF4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fRyh8G9cR-PTwmb7TlpmlX5kQF4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fRyh8G9cR-PTwmb7TlpmlX5kQF4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fRyh8G9cR-PTwmb7TlpmlX5kQF4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/FhktffGVl_A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/7328007482571773581/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=7328007482571773581" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7328007482571773581?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7328007482571773581?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/FhktffGVl_A/aspnet-mvc-when-to-use-strongly-typed.html" title="Asp.net MVC – When to use strongly typed ViewData?" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_bMpk9bZVyqc/S455q750lAI/AAAAAAAAAF8/pI8oFFeSSDI/s72-c/image_thumb.png?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/03/aspnet-mvc-when-to-use-strongly-typed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUESXs7fCp7ImA9WxBWEkQ.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-4989183898186957439</id><published>2010-02-04T15:32:00.001Z</published><updated>2010-02-04T15:43:28.504Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-04T15:43:28.504Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="Wcf" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Best error message … Ever!</title><content type="html">&lt;p&gt;I’ve had a few good error messages in my time, but waiting for something I am debugging at work to time out I just received the following message:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bMpk9bZVyqc/S2rofphG2rI/AAAAAAAAAFg/5qgFfVWNuNA/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_bMpk9bZVyqc/S2rogdVQBxI/AAAAAAAAAFk/hNtIA_zY0r8/image_thumb%5B2%5D.png?imgmax=800" width="453" height="193" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Nice!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Edit&lt;/strong&gt;: Found a useful &lt;a href="http://stackoverflow.com/questions/1523036/wcf-catastrophic-failure" target="_blank"&gt;Stackoverflow answer&lt;/a&gt; to help resolve this issue.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-4989183898186957439?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8siFcM78rGlEBcNWbev2bTBsrNU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8siFcM78rGlEBcNWbev2bTBsrNU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8siFcM78rGlEBcNWbev2bTBsrNU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8siFcM78rGlEBcNWbev2bTBsrNU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/V8NpXCQcPRg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/4989183898186957439/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=4989183898186957439" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/4989183898186957439?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/4989183898186957439?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/V8NpXCQcPRg/best-error-message-ever.html" title="Best error message … Ever!" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_bMpk9bZVyqc/S2rogdVQBxI/AAAAAAAAAFk/hNtIA_zY0r8/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/02/best-error-message-ever.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMGQnwzeip7ImA9WxBWFE0.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-822567010456035897</id><published>2010-02-01T20:56:00.001Z</published><updated>2010-02-05T21:47:03.282Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-05T21:47:03.282Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="First Thousand Beers" /><category scheme="http://www.blogger.com/atom/ns#" term="Gym" /><title>January Update; it’s all about the diet &amp; disc golf</title><content type="html">&lt;p&gt;It’s time for a January update on how the diet/exercise bits and bobs are going. &lt;/p&gt;  &lt;p&gt;Generally speaking January has been a good month. Loosing every week except the last week and then only putting on 1.5lbs that week. This week was a big one as weeks go as I had a dev social on the Friday after weigh in the week before. We then went out for a curry on the Saturday night. The following week Lau and I had our “get together” anniversary (9 years!) which also doubles as our 1/2 yr wedding anniversary (1.5yrs) and my birthday on the Thursday so went out for dinner on Wednesday. As you can image this didn’t help with getting to the gym or dieting generally.&lt;/p&gt;  &lt;p&gt;So overall, I have lost 1.25lbs this month. This isn’t great and I need to step it up a bit in February. I really want to get under 11stone by end of Feb / mid march time. So 4-6 weeks to drop 4.5lbs so its defo do-able.&lt;/p&gt;  &lt;p&gt;So that’s it diet wise. Along with Frostbreaker the last weekend of the month where I shot reasonably well (for me) and was only 5 shots off making the Adv Am final. This is a good achievement for me and I’m really happy with how I played. I also had loads of energy which resulted in playing another 7 or so holes after lunch while the finals where taking place but also ran up a couple of hills. The gym’ing must be helping!&lt;/p&gt;  &lt;p&gt;Right, so end of month means first thousand beers update … &lt;/p&gt;  &lt;p&gt;Current weight loss (since Aug ‘09) : 14 5/8lbs&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Current Status&lt;/strong&gt; &lt;strong&gt;:&lt;/strong&gt; &lt;strong&gt;&lt;font color="#ff0000"&gt;Bad&lt;/font&gt;&lt;/strong&gt;! (-83.3)     &lt;br /&gt;Beers: 461 + 29 = 490     &lt;br /&gt;Miles: 162.5 (gym: 129.5; road: 33) + 20.5 = 183     &lt;br /&gt;DG Rounds: 67 + 8 = 75     &lt;br /&gt;Gym visits: 82 + 12 = 94     &lt;br /&gt;Lengths : 54.7 (total: 547)&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;strong&gt;Key&lt;/strong&gt;     &lt;br /&gt;&lt;font color="#00ff40"&gt;&lt;strong&gt;Good&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;gt; Beers     &lt;br /&gt;&lt;strong&gt;Level&lt;/strong&gt; =&amp;gt; Exercise == Beers     &lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Bad&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;lt; Beers&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-822567010456035897?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/cbF2w-Nj5H3Gr5B3RD40JS1isWg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cbF2w-Nj5H3Gr5B3RD40JS1isWg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/cbF2w-Nj5H3Gr5B3RD40JS1isWg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/cbF2w-Nj5H3Gr5B3RD40JS1isWg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/JQO_xrJSdr4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/822567010456035897/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=822567010456035897" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/822567010456035897?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/822567010456035897?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/JQO_xrJSdr4/january-update-its-all-about-diet-disc.html" title="January Update; it’s all about the diet &amp;amp; disc golf" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/02/january-update-its-all-about-diet-disc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcMQ3g6eyp7ImA9WxBXFU0.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-7037411176736243452</id><published>2010-01-26T12:14:00.001Z</published><updated>2010-01-26T12:14:42.613Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-26T12:14:42.613Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Team Foundation Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><category scheme="http://www.blogger.com/atom/ns#" term="Backup" /><title>Migrating Team Foundation Server 2010 Beta 2 to new servers</title><content type="html">&lt;p&gt;&lt;em&gt;Disclaimer : It worked for me, and I hope it works for you, but do so at your own peril. Make sure everything is backed up and I’d suggest testing on a spare machine first before doing it for real.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;We’ve been looking at changing our infrastructure at work and moving from VMWare for our virtual servers to using Windows Server 2008 and Hyper-V. The main server which needed to be moved/converted/migrated between the two different virtualisation technologies was the TFS Server; and hence my domain.&lt;/p&gt;  &lt;p&gt;I started off by trying to convert the vmdk file to a vhd file which seemed to work well and could be mounted and the data on it read. However; I was unable to boot from it. After spending, way, too much time trying to get it working I decided to look at the migration exercise. And to be honest it was essentially a disaster recovery exercise as we’d have to go through the same steps if it all went wrong so the time wasn’t wasted.&lt;/p&gt;  &lt;p&gt;So after doing a test run on a spare virtual machine we had before the server was taken down I fired up the install for SQL Express and started on the path to setting up TFS. After doing some Googling, and finding loads of different articles which seemed to do bits but not all of it I thought I’d post my findings to hopefully help someone in the future. These are the steps which I came up with. I have also now deployed TFS into the new virtualised production system and it seems to work fine (not got automated builds working yet tho).&lt;/p&gt;  &lt;p&gt;Here we go:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Backup databases from old TFS. This includes the Tfs_Configuration databases and any project collection databases.&lt;/li&gt;    &lt;li&gt;Build/patch new VM with Windows Server (or other OS)&lt;/li&gt;    &lt;li&gt;Install SQL Express 2008 with tools&lt;/li&gt;    &lt;li&gt;Restore databases, with the same names, into your new SQL Server instance&lt;/li&gt;    &lt;li&gt;Install Team Foundation Server 2010 Beta 2 (and reboot when required)&lt;/li&gt;    &lt;li&gt;Run the following command – making sure that you have the correct details in the right places     &lt;br /&gt;      &lt;br /&gt;c:\Program Files\Microsoft Team Foundation Server 2010\Tools&amp;gt;tfsconfig accounts /add /accountType:applicationTier /account:&amp;quot;NT Authority\Network Service&amp;quot; /sqlInstance:&lt;strong&gt;&lt;font color="#ff0000"&gt;.\SqlExpress&lt;/font&gt;&lt;/strong&gt; /databasename:tfs_configuration      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Create a local user named after the server name. So for example if your server is called “TFS” then create a local user called “TFS$” (without quotes)&lt;/li&gt;    &lt;li&gt;Fire up the Team Foundation Server admin, go to configure installed components and run the Application Tier only upgrade wizard&lt;/li&gt;    &lt;li&gt;Once in the wizard point it to the SQL instance locally and it should find the configuration database, select it and continue.&lt;/li&gt;    &lt;li&gt;Finish the wizard and it should be pretty happy. Next thing to do is update the server urls on the main server details page to point to the new server name (as it’ll have the old server name in it)&lt;/li&gt;    &lt;li&gt;Start up the project collection(s) and throw in a server restart for good measure.&lt;/li&gt;    &lt;li&gt;Done!&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You should now be able to connect to the server through Visual Studio as before. You will need to add in the new server details (and remove the old). I found all the workspaces where fine and all was good to go.&lt;/p&gt;  &lt;p&gt;With a big team its probably wise to get everyone to shelve all their changes over a weekend or evening and make sure nothing is checked out. But this is down to preference and may need to be tested.&lt;/p&gt;  &lt;p&gt;Hope this helps someone in the future :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-7037411176736243452?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j93R5db6th7xmCmOHylBDTf8Vbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j93R5db6th7xmCmOHylBDTf8Vbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/j93R5db6th7xmCmOHylBDTf8Vbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j93R5db6th7xmCmOHylBDTf8Vbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/x-aFFvdWV3w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/7037411176736243452/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=7037411176736243452" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7037411176736243452?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/7037411176736243452?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/x-aFFvdWV3w/migrating-team-foundation-server-2010.html" title="Migrating Team Foundation Server 2010 Beta 2 to new servers" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/01/migrating-team-foundation-server-2010.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcHRH46fSp7ImA9WxBQEEk.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-5823300014500841645</id><published>2010-01-09T13:33:00.001Z</published><updated>2010-01-09T13:33:55.015Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-09T13:33:55.015Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Geek" /><category scheme="http://www.blogger.com/atom/ns#" term="Review" /><category scheme="http://www.blogger.com/atom/ns#" term="svn" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><category scheme="http://www.blogger.com/atom/ns#" term="Backup" /><title>Cheap remote backup solution</title><content type="html">&lt;p&gt;After reading the madness of what happened to &lt;a href="http://www.haacked.com" target="_blank"&gt;Phil Haack&lt;/a&gt; a few weeks ago and a few other people who had VPS’ running on the same machine after a physical hard drive failure everyone on the box (so it seemed) realised that they didn’t have much, if any, backup solution in place. This got me thinking …&lt;/p&gt;  &lt;p&gt;There are a number of remote backup solutions for remote servers but they cost money which at the current time I don’t have, and most people don’t have due to the current economical climate. So was checking my email the other day and scrolled to the bottom of the page and noticed that I was only using a small amount of the my &lt;a href="http://gmail.com" target="_blank"&gt;gmail&lt;/a&gt; account storage. It got me thinking that there was a plug in you could get to use your gmail account a remote storage / mapped network drive. This could be the reliable backup solution I’m looking for.&lt;/p&gt;  &lt;p&gt;After doing a bit of Googling about to see if there was anything out there before I set down to write my own solution to this problem I found &lt;a href="http://www.codeproject.com/KB/files/backup2Gmail.aspx" target="_blank"&gt;backup2Gmail&lt;/a&gt; on &lt;a href="http://codeproject.com" target="_blank"&gt;Code Project.&lt;/a&gt; Once I realised that you could run this from a command line then I was on to a winner.&lt;/p&gt;  &lt;p&gt;So the backup bat file goes along the lines of:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Backup the svn respository using svnadmin to a backup folder (c:\backup\svn)&lt;/p&gt;    &lt;p&gt;Checkout the latest code from the repository to a folder in the backup folder (c:\backup\code)&lt;/p&gt;    &lt;p&gt;Run the backup 2 gmail command line to backup the c:\backup folder. It then zips it up and sends it to my account.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And that’s it. Put all that into a bat file, put some error checking in to make sure the dirs which are required are there at the beginner, removed at the end etc. and then set it as a scheduled task for some crazy time early in the day (currently set at 3am).&lt;/p&gt;  &lt;p&gt;Hope this helps someone else in the future to avoid the heart ache of server failure.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-5823300014500841645?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/stvhV-CKec78qvVISm5rhs6NuZM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/stvhV-CKec78qvVISm5rhs6NuZM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/stvhV-CKec78qvVISm5rhs6NuZM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/stvhV-CKec78qvVISm5rhs6NuZM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/fZn2B5354uE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/5823300014500841645/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=5823300014500841645" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5823300014500841645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/5823300014500841645?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/fZn2B5354uE/cheap-remote-backup-solution.html" title="Cheap remote backup solution" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/01/cheap-remote-backup-solution.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYCRXw4eCp7ImA9WxBRGEU.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-8154532841204133308</id><published>2010-01-07T16:02:00.001Z</published><updated>2010-01-07T16:02:44.230Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-07T16:02:44.230Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C# 3.0" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>Map network drive in code</title><content type="html">&lt;p&gt;I needed to programmatically map a share drive to access files for a asp.net web application. This works on the app pool identity and doesn’t have mapped drives by default so after a little Googling, I found this : &lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.codeproject.com/KB/system/mapnetdrive.aspx" href="http://www.codeproject.com/KB/system/mapnetdrive.aspx"&gt;http://www.codeproject.com/KB/system/mapnetdrive.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It maybe a few years old, but works like a dream!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-8154532841204133308?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MpvFCNXSO4I4hhtQI7BXnHtMRRA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MpvFCNXSO4I4hhtQI7BXnHtMRRA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MpvFCNXSO4I4hhtQI7BXnHtMRRA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MpvFCNXSO4I4hhtQI7BXnHtMRRA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/8ptFBGO6sno" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/8154532841204133308/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=8154532841204133308" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8154532841204133308?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8154532841204133308?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/8ptFBGO6sno/map-network-drive-in-code.html" title="Map network drive in code" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/01/map-network-drive-in-code.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUDRno5fip7ImA9WxBRGEw.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-3878634134322865629</id><published>2010-01-06T17:53:00.001Z</published><updated>2010-01-06T20:37:57.426Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-06T20:37:57.426Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7" /><category scheme="http://www.blogger.com/atom/ns#" term="Rant" /><category scheme="http://www.blogger.com/atom/ns#" term="General" /><title>A device attached to the system is not functioning</title><content type="html">&lt;p&gt;I rebooted my windows 7 machine yesterday and could successfully remote desktop to it. I then disconnected from the session as I had some things running and wanted them to continue to run. When I try to re-connect tonight I get :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bMpk9bZVyqc/S0TOKOdChaI/AAAAAAAAAFE/92qujF4Erx8/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_bMpk9bZVyqc/S0TOKtCI_zI/AAAAAAAAAFI/LcjWJUqgB-w/image_thumb%5B2%5D.png?imgmax=800" width="428" height="354" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Any ideas what this means?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Edit:&lt;/strong&gt; Tried running remote desktop from the command line with the /console option and that doesn’t resolve the issue either :-(&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-3878634134322865629?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r4Y7Ma2EqacHkVW9_4uYolmw7wA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r4Y7Ma2EqacHkVW9_4uYolmw7wA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r4Y7Ma2EqacHkVW9_4uYolmw7wA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r4Y7Ma2EqacHkVW9_4uYolmw7wA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/npmiYCbHer4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/3878634134322865629/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=3878634134322865629" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3878634134322865629?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3878634134322865629?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/npmiYCbHer4/device-attached-to-system-is-not.html" title="A device attached to the system is not functioning" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_bMpk9bZVyqc/S0TOKtCI_zI/AAAAAAAAAFI/LcjWJUqgB-w/s72-c/image_thumb%5B2%5D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/01/device-attached-to-system-is-not.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UEQno9eyp7ImA9WxBRE0s.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-90098376755168556</id><published>2010-01-01T18:06:00.001Z</published><updated>2010-01-01T18:06:43.463Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-01T18:06:43.463Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="General" /><category scheme="http://www.blogger.com/atom/ns#" term="First Thousand Beers" /><category scheme="http://www.blogger.com/atom/ns#" term="Gym" /><category scheme="http://www.blogger.com/atom/ns#" term="Disc Golf" /><title>End of 2009 – General thoughts, musings and diet updates.</title><content type="html">&lt;p&gt;Well the end of the year is upon us and I think it’s time I reflected a little on what’s happened diet wise, fitness wise and a little in general. &lt;/p&gt;  &lt;p&gt;First time in a while the exercise has been above and beyond the beer intake. With this and the diet that I’m undertaking with my wife the weight has gone down slowly yet steadily which is good. At least this way I am more likely to keep it off. I’m also feeling a lot healthier now that I have lost some weight and generally eating better. Improving what we ate (using Weight Watchers cook books) the food has been filling, tasty and yet not fatty or loads of points.&lt;/p&gt;  &lt;p&gt;At least once a winter period I go down with a stinking cold, I don’t get the flu as I have the inoculation every year, and it hits me for 6 for a few weeks at a time. Since going to the gym regularly and eating better I have felt great for the past few months not being worse than a bit of a blocked nose, until now. Ah well, hopefully will start feeling better when I get back into the swing of things with gym, food and work on Monday.&lt;/p&gt;  &lt;p&gt;I’ve been impressed that I’ve managed to keep the weight off as well and I feel good for it. Only downside is the bits they don’t tell when you’re on a diet like you’ll feel the cold more as you don’t have so much podge to keep you warm! Below is the graph of weight loss since the start of the diet. As you can see it’s been a bit poor over the festive period but will get it back on track in January.   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_bMpk9bZVyqc/Sz45sHAgjLI/AAAAAAAAAEw/HzmsIHrCU34/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_bMpk9bZVyqc/Sz45sqUKanI/AAAAAAAAAE0/jIkAV-S0eKY/image_thumb%5B1%5D.png?imgmax=800" width="536" height="289" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As for work related stuff, it’s been up and down this past year as I’ve posted before, but I am looking forward to the new year and what it will bring. I’ve got a lot of things planned both work and external related and I look forward to implementing most if not all of it. Also in the new year I will be posting more disc golf related content as well as more coding and design posts. I hope you enjoy!&lt;/p&gt;  &lt;p&gt;Right, last bit to do is the first thousand beers update … &lt;/p&gt;  &lt;p&gt;Current weight loss (since Aug) : 13 3/8lbs&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Current Status&lt;/strong&gt; &lt;strong&gt;:&lt;/strong&gt; &lt;strong&gt;&lt;font color="#ff0000"&gt;Bad&lt;/font&gt;&lt;/strong&gt;! (-94.8)    &lt;br /&gt;Beers: 386 + 75 =&amp;#160; 461    &lt;br /&gt;Miles: 97.3 (gym: 64.3; road: 33) + 65.2&amp;#160; = 162.5    &lt;br /&gt;DG Rounds: 62 + 5 = 67&amp;#160; &lt;br /&gt;Gym visits: 70&amp;#160; + 12 = 82    &lt;br /&gt;Lengths : 51 (total: 512) + 35 =&amp;#160; 547 =&amp;gt; 54.7    &lt;br /&gt;&lt;strong&gt;Key&lt;/strong&gt;     &lt;br /&gt;&lt;font color="#00ff40"&gt;&lt;strong&gt;Good&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;gt; Beers     &lt;br /&gt;&lt;strong&gt;Level&lt;/strong&gt; =&amp;gt; Exercise == Beers     &lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Bad&lt;/strong&gt;&lt;/font&gt; =&amp;gt; Exercise &amp;lt; Beers&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-90098376755168556?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/knxd8pqn63vwUIzIYiFFqmgx1oA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/knxd8pqn63vwUIzIYiFFqmgx1oA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/knxd8pqn63vwUIzIYiFFqmgx1oA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/knxd8pqn63vwUIzIYiFFqmgx1oA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/u48GHZplEIk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/90098376755168556/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=90098376755168556" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/90098376755168556?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/90098376755168556?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/u48GHZplEIk/end-of-2009-general-thoughts-musings.html" title="End of 2009 – General thoughts, musings and diet updates." /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_bMpk9bZVyqc/Sz45sqUKanI/AAAAAAAAAE0/jIkAV-S0eKY/s72-c/image_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2010/01/end-of-2009-general-thoughts-musings.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQFQHY7cSp7ImA9WxBSFEQ.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-8991665034627434962</id><published>2009-12-22T13:58:00.001Z</published><updated>2009-12-22T13:58:31.809Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-22T13:58:31.809Z</app:edited><title>Worthy of a dailywtf post?</title><content type="html">&lt;p&gt;Just followed a link on Twitter to vote for best celebrity tweeter. So went through the list finding someone to vote for and got the following error:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bMpk9bZVyqc/SzDQgi0GaGI/AAAAAAAAAD0/gATaqILo15o/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_bMpk9bZVyqc/SzDQhtMOfVI/AAAAAAAAAD4/HhN9ycI6SvI/image_thumb%5B1%5D.png?imgmax=800" width="678" height="278" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Sweet! :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-8991665034627434962?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BTKbMLVLPFo-aFJNPFLA4s-FYL8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BTKbMLVLPFo-aFJNPFLA4s-FYL8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BTKbMLVLPFo-aFJNPFLA4s-FYL8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BTKbMLVLPFo-aFJNPFLA4s-FYL8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/hTLzZHRGHTU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/8991665034627434962/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=8991665034627434962" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8991665034627434962?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/8991665034627434962?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/hTLzZHRGHTU/worthy-of-dailywtf-post.html" title="Worthy of a dailywtf post?" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_bMpk9bZVyqc/SzDQhtMOfVI/AAAAAAAAAD4/HhN9ycI6SvI/s72-c/image_thumb%5B1%5D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2009/12/worthy-of-dailywtf-post.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cGRHc_fSp7ImA9WxBSFE8.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-2033714567843108619</id><published>2009-12-21T19:48:00.001Z</published><updated>2009-12-21T19:50:25.945Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-21T19:50:25.945Z</app:edited><title>Feedback module like MSDN in Asp.net MVC</title><content type="html">&lt;p&gt;&lt;strong&gt;Aim&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Create a feedback module similar to the new one MSDN is using done in the asp.net MVC framework. This will including using some JQuery. Also I want to make it as steam lined and unobtrusive as possible. The functionality has to be user friendly but not interrupt current workflow.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bMpk9bZVyqc/Sy_Q7zBg11I/AAAAAAAAADI/Kj9Ts5WVzgE/s1600-h/image41.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_bMpk9bZVyqc/Sy_Q8YWVvuI/AAAAAAAAADM/W70_RK34l3M/image4_thumb.png?imgmax=800" width="296" height="156" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is the challenge … lets see how it goes!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;So the first issue which needed to be addressed was “how to get the view displayed?”. For this I initially turned to the Html.RenderAction() helper method and to render a partial view. I decided against this quite early on due to the restriction of posting actions back to the view which was nested into the main view. This seemed to cause issues with post backs and just felt wrong.&lt;/p&gt;  &lt;p&gt;So decided to go the System.Web.Mvc.PartialViewResult route instead. To use this, the feedback controller required to return the PartialView for the actions which are required for this module of functionality.&lt;/p&gt;  &lt;p&gt;Next was the flow of the interaction with the user; from clicking the initial link in the corner of the browser to submitting the comment, thanking the user and finally returning back to the original state.&lt;/p&gt;  &lt;p&gt;To keep it simple, I kept the feedback model class very simple. This wasn’t the primary aim of this task so being able to submit a comment was good enough for this exercise.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:67ce6039-6b76-4a37-93d2-a3ae29acc6e3" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; MvcApplication3.Models&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; Feedback&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Comment { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; DateTime Logged { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; UserAgent { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Ip { &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;get&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;set&lt;/span&gt;&lt;span style="color: #000000;"&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Like I said, very simple :-)&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So, time for the controller. Due to the flow I needed to display the feedback partial view, display the thanks partial view and the actual submit action code with the model binding.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c003a239-33a3-4957-b011-da5dc07d2e7d" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; System.Web.Mvc;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;using&lt;/span&gt;&lt;span style="color: #000000;"&gt; MvcApplication3.Models;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;namespace&lt;/span&gt;&lt;span style="color: #000000;"&gt; MvcApplication3.Controllers&lt;br /&gt;{&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; FeedbackController : Controller&lt;br /&gt;    {&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; GET: /Feedback/&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        [HttpGet]&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; ActionResult Get()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; PartialView(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Feedback&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [HttpGet]&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; ActionResult Thanks()&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; PartialView(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;FeedbackThanks&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [HttpPost]&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; Submit(Feedback feedback)&lt;br /&gt;        {&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; update to the date required for logging&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            feedback.Logged &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; DateTime.Now;&lt;br /&gt;            feedback.UserAgent &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; Request.UserAgent;&lt;br /&gt;            feedback.Ip &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; Request.UserHostAddress;&lt;br /&gt;            &lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; and save&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            &lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I limited the http verbs on the actions so that they are restricted properly. So, all the c# code has been written. Looking at this it seems straight forward and relatively simple :-)&lt;br /&gt;&lt;br /&gt;&lt;p&gt;All the views would need to be accessed from a central location, so I put them in the shared view folder (see solution explorer view below).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_bMpk9bZVyqc/Sy_Q8474ZqI/AAAAAAAAADQ/03swuPUNVbE/s1600-h/image7.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_bMpk9bZVyqc/Sy_Q9uE4gWI/AAAAAAAAADU/fxQCCP3lPB0/image_thumb3.png?imgmax=800" width="247" height="513" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Site.Master&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The site master is where the feedback button is situated as it appears on each of the pages which uses this master page. From a markup perspective we needed to add the button div itself and the div which the partial views will be loaded into.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8c738e90-3e59-4e48-be1d-32afb2362257" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-button"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; title&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Click here to tell us what you think!"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;a &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedbackLaunch"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;feedback&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;a&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedbackformDiv"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/_bMpk9bZVyqc/Sy_Q-LmupiI/AAAAAAAAADY/3AaqGS4M3sU/s1600-h/image17.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_bMpk9bZVyqc/Sy_Q-glTiBI/AAAAAAAAADc/5kSVCzRsIn4/image_thumb9.png?imgmax=800" width="506" height="482" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Where the magic happens is in the jQuery client side script. Instead of trying to explain it, I’ll just post it as we go and go through the highlights as the rest will be self explanatory.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:37fe56fd-e894-46b7-8e5a-6ae0d391e060" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; global flag to display the feedback routine&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="color: #000000;"&gt; displayFeedback &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;true&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        $(document).ready(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt;() {&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; display the feedback form&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;            $(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;#feedbackLaunch&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;).click(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="color: #000000;"&gt;() {&lt;br /&gt;&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; depending on the feedback for, hide or show it&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (displayFeedback) {&lt;br /&gt;                    $(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;#feedbackformDiv&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;).load(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;/Feedback/Get&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;).fadeIn(&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;slow&lt;/span&gt;&lt;span style="color: #000000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;br /&gt;                }&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;else&lt;/span&gt;&lt;span style="color: #000000;"&gt; {&lt;br /&gt;                    $(&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;#feedbackformDiv&lt;/span&gt;&lt;span style="color: #000000;"&gt;'&lt;/span&gt;&lt;span style="color: #000000;"&gt;).hide();&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; flip the bit&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;                displayFeedback &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;!&lt;/span&gt;&lt;span style="color: #000000;"&gt;displayFeedback;&lt;br /&gt;            });&lt;br /&gt;        });&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The main driving force of visibility is the displayFeedback variable. This has been declared at this level so that its scope is accessible from the partial views as well. The reason why I did this was that once the interaction flow had occured a double click on the feedback button was required to display the comment form again. This wasn’t required behaviour. I tried using the jQuery toggle functionality but this didn’t perform as required either.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Feedback.aspx&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The partial view is where the main action happens. This is the main display form which prompts the user for the comment and to submit it.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bMpk9bZVyqc/Sy_Q_E7pkoI/AAAAAAAAADg/DyBd8qyTWVk/s1600-h/image16.png"&gt;&lt;img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_bMpk9bZVyqc/Sy_Q_wUmBpI/AAAAAAAAADk/5cwfuM5f1gU/image_thumb8.png?imgmax=800" width="509" height="485" /&gt;&lt;/a&gt;This is made up of the header which has a close button on it, and the main form with a simple submit button. The markup and script of the file is below:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:27cb9545-18a7-4072-afaf-49e5b8a743d1" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;@ Page Language&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;C#&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; Inherits&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;System.Web.Mvc.ViewPage&amp;lt;MvcApplication3.Models.Feedback&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;&lt;br /&gt;&lt;br /&gt;    $(document).ready(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;() {&lt;br /&gt;&lt;br /&gt;        $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackForm&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).submit(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;() {&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;var&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; action &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackForm&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).attr(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;action&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;);&lt;br /&gt;&lt;br /&gt;            $.post(action,&lt;br /&gt;                            $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackForm&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).serialize(),&lt;br /&gt;                            callBack);&lt;br /&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;false&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;;&lt;br /&gt;&lt;br /&gt;        }); &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;//&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt; end of form submit function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;&lt;br /&gt;    }); &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;//&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;end of document ready function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;//&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt; call back function to load in the thanks view&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;    &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; callBack(e) {&lt;br /&gt;        $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackformDiv&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).load(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;/Feedback/Thanks&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;//&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt; close the feedback and reverse the displayfeedback bool value&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #008000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;    &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; closeFeedback() {&lt;br /&gt;        $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackformDiv&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).hide();&lt;br /&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; (displayFeedback &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; undefined) {&lt;br /&gt;            displayFeedback &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;!&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;displayFeedback;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-header"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        Please leave some feedback&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-header-close"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;a &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;href&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="javascript:closeFeedback();"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;x&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;a&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-panel"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;form &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;action&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="&amp;lt;%= Url.Action("&lt;/span&gt;&lt;span style="color: #FF0000;"&gt;Submit", "Feedback") %&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;" id="feedbackForm" method="post"&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; Html.LabelFor(model &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; model.Comment) &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; Html.TextAreaFor(model &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; model.Comment, &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800080;"&gt;5&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;, &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800080;"&gt;50&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;, &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; { Width &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;350px;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;, Height &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;150px;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #800000;"&gt;"&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; }) &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;&amp;lt;%&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; Html.ValidationMessageFor(model &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; model.Comment) &lt;/span&gt;&lt;span style="background-color: #FFFF00; color: #000000;"&gt;%&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;input &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="submit"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; value&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="Submit"&lt;/span&gt;&lt;span style="color: #FF0000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;form&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;This is all relatively straight forward, the main bit to notice is the&amp;#160; serialize method on the form jQuery object. This serializes the contents of the form to the action. I originally thought this may get in the way of the model binding with the mvc framework into the action, but it magically sorts itself out. Genius!&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The other part of functionality is the call back function from the form submit action. Very simply, this just loads in the next partial view to thank the user for submitting their comment to the team.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;FeedbackThanks.aspx&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The thanks form is very simple. Just a way of displaying a thank you note to your users and then disappear again leaving the user where they were, as if it never happened.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_bMpk9bZVyqc/Sy_RAbg4nbI/AAAAAAAAADo/srJcX85mIig/s1600-h/3%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="3" border="0" alt="3" src="http://lh3.ggpht.com/_bMpk9bZVyqc/Sy_RBInngXI/AAAAAAAAADs/gNKMZejQDVU/3_thumb%5B2%5D.png?imgmax=800" width="510" height="486" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; All the client side javascript does is after a defined time hit the thanks form you see above and invert the boolean variable to make the show/hide work correctly.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:12225dfa-50d7-4456-a743-4e068b3e0ead" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="text/javascript"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;&lt;br /&gt;&lt;br /&gt;    $(document).ready(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;() {&lt;br /&gt;&lt;br /&gt;        setTimeout(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;function&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;() {&lt;br /&gt;            $(&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;#feedbackformDiv&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;'&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;).hide();&lt;br /&gt;            &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; (displayFeedback &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;!=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; undefined) {&lt;br /&gt;                displayFeedback &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;=&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt; &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;!&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;displayFeedback;&lt;br /&gt;            }&lt;br /&gt;        }, &lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;2000&lt;/span&gt;&lt;span style="background-color: #F5F5F5; color: #000000;"&gt;);&lt;br /&gt;&lt;br /&gt;    });&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-thanks"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-header"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        Thanks&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div &lt;/span&gt;&lt;span style="color: #FF0000;"&gt;class&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;="feedback-ui-panel"&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;        Thanks for helping improve our application.&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;And that’s it.&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So what have we learnt from this little exercise:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Creation of views through the Visual Studio tooling for Asp.net MVC&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;jQuery basics – selectors, built in functions and basic dom manipulation&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Partial view actions through controllers&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Strongly typed model formatting&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Additional extension points which would be good to plug in would be:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;  &lt;li&gt;Additional fields / different types of feedback options&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Response validation&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;What’s next?!&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Well over the next couple of months I will be working on some interesting things and techniques and I hope to find time to share some of them with you all. If you have any suggestions of things to do, or any improvements then please leave a comment or get in contact through &lt;a href="http://www.twitter.com/WestDiscGolf" target="_blank"&gt;twitter&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/3418498436020656026-2033714567843108619?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JHI0qr-fRVIK7BPokHvghohmlpY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JHI0qr-fRVIK7BPokHvghohmlpY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JHI0qr-fRVIK7BPokHvghohmlpY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JHI0qr-fRVIK7BPokHvghohmlpY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/sv5EVDPYXiI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/2033714567843108619/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=2033714567843108619" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/2033714567843108619?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/2033714567843108619?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/sv5EVDPYXiI/feedback-module-like-msdn-in-aspnet-mvc.html" title="Feedback module like MSDN in Asp.net MVC" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_bMpk9bZVyqc/Sy_Q8YWVvuI/AAAAAAAAADM/W70_RK34l3M/s72-c/image4_thumb.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2009/12/feedback-module-like-msdn-in-aspnet-mvc.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQGRnY4fip7ImA9WxNaFks.&quot;"><id>tag:blogger.com,1999:blog-3418498436020656026.post-3692307034047443723</id><published>2009-12-01T10:12:00.001Z</published><updated>2009-12-01T10:12:07.836Z</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-01T10:12:07.836Z</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Geek" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="Wcf" /><category scheme="http://www.blogger.com/atom/ns#" term="Code" /><title>WCF and serializing custom objects</title><content type="html">&lt;p&gt;I’ve been setting up an wcf service for a new n-tier system which I am currently architecting and developing at work. I’m trying to get to the point where all tiers store the data in the same objects (Entities) and they are worked on at different levels. These are simple POCO Entity objects which only store the data values and defined the data annotations to be used with validation. This will require the WCF service to be able to serialize the custom objects and transmit them between the tiers and in future, who knows maybe to a Silverlight client application as well?!&lt;/p&gt;  &lt;p&gt;So, with the objects in place and with the correct DataContract and DataMember attributes in place I get the following error message when trying to pass them through the service between tiers:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“The underlying connection was closed: The connection was closed unexpectedly.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;After doing some Googling I came across the following blog post which had some handy pointers … &lt;a href="http://bishoylabib.blogspot.com/2009/04/underlying-connection-was-closed.html" target="_blank"&gt;thanks Bishoy Labib&lt;/a&gt;. But the biggest help was from a post by &lt;a href="http://developers.de/blogs/damir_dobric/archive/2009/03/24/about-quot-knowntypeattribute-quot-example.aspx" target="_blank"&gt;Damir Dobric&lt;/a&gt;. His post explaining how the &amp;quot;KnownTypeAttribute” is used when sending through data over a wcf service was very handy.&lt;/p&gt;  &lt;p&gt;So after decorating the interface with each type of Entity I had which (3 so far) I built the project, got the service reference to update to get the latest definition and ran it with fingers crossed … it worked!&lt;/p&gt;  &lt;p&gt;Damir had adding each of the types which might be used through the WCF service interface defined individually, then refactored it by adding them through the KnownTypeContainer (similar to below) and added them manually. This wouldn’t quite work for me as there are going to be, probably, lots of entities and I don’t want to have to add one individually each time. As all the entities are defined in a single project, I thought with a little reflection on the Assembly I could dynamically load them in so came up with this …&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:c34dc4a0-22f5-44b5-ae48-c9f1217efdf6" class="wlWriterEditableSmartContent"&gt;&lt;pre style="background-color:#FFFFFF;overflow: auto;"&gt;&lt;span style="color: #000000;"&gt;[ServiceKnownType(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;GetAllMyKnownTypes&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;typeof&lt;/span&gt;&lt;span style="color: #000000;"&gt;(KnownTypeContainer))] &lt;br /&gt;[ServiceContract(Namespace &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;http://mynamespace/2009/IApplication&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;)] &lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;interface&lt;/span&gt;&lt;span style="color: #000000;"&gt; IApplication &lt;br /&gt;{ &lt;br /&gt;    [OperationContract] &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; Echo(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; value); &lt;br /&gt;&lt;br /&gt;    [OperationContract] &lt;br /&gt;    Entities.EntityBase Execute(&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt; action,&lt;br /&gt;                    Dictionary&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;string&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;object&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; parameters); &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;class&lt;/span&gt;&lt;span style="color: #000000;"&gt; KnownTypeContainer &lt;br /&gt;{ &lt;br /&gt;    &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;public&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;static&lt;/span&gt;&lt;span style="color: #000000;"&gt; IEnumerable&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;br /&gt;            GetAllMyKnownTypes(ICustomAttributeProvider p) &lt;br /&gt;    { &lt;br /&gt;        &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;return&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;new&lt;/span&gt;&lt;span style="color: #000000;"&gt; List&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;Type&lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;(&lt;br /&gt;                Assembly.Load(&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #800000;"&gt;Entities&lt;/span&gt;&lt;span style="color: #800000;"&gt;"&lt;/span&gt;&lt;span style="color: #000000;"&gt;).GetTypes()&lt;br /&gt;                ); &lt;br /&gt;    } &lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Nothing special, or clever, just need to make sure that all the Entities derive from the common EntityBase abstract class to work.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Thanks go to Damir for the original post and getting me through my issue I was having :-)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3418498436020656026-3692307034047443723?l=westdiscgolf.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7QPcfzL0GBhOCpUatrycHiqa8wc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7QPcfzL0GBhOCpUatrycHiqa8wc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7QPcfzL0GBhOCpUatrycHiqa8wc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7QPcfzL0GBhOCpUatrycHiqa8wc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WestDiscGolf/~4/XZ0xJeK4u7o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://westdiscgolf.blogspot.com/feeds/3692307034047443723/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=3418498436020656026&amp;postID=3692307034047443723" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3692307034047443723?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3418498436020656026/posts/default/3692307034047443723?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WestDiscGolf/~3/XZ0xJeK4u7o/wcf-and-serializing-custom-objects.html" title="WCF and serializing custom objects" /><author><name>West</name><uri>http://www.blogger.com/profile/07341492158293766269</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://westdiscgolf.blogspot.com/2009/12/wcf-and-serializing-custom-objects.html</feedburner:origLink></entry></feed>

