<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Jim Wang's Blog</title><link>https://weblogs.asp.net:443/jimwang/</link><description>Chronicles of a .NET Test Ninja </description><item><title>Debugging Node (node-inspector) in the Azure emulator</title><link>https://weblogs.asp.net:443/jimwang/debugging-node-node-inspector-in-the-azure-emulator</link><description>&lt;p&gt;One thing I ran into this week is trying to run node within the Azure emulator, giving me access to the emulated versions of Azure table storage, queues, and blob, while also having debugging running.&lt;/p&gt;  &lt;p&gt;If you are familiar with the Azure Node.js SDK, you’ll know that you can launch your role using the Start-AzureEmulator Powershell command. Unfortunately, this command doesn’t seem to have any debugging options.&lt;/p&gt;  &lt;p&gt;Fear not: there’s an easy way to get this up and running with node-inspector: you can open up ServiceDefinition.csdef, where you should see the following line:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EntryPoint&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ProgramEntryPoint&lt;/span&gt; &lt;span class="attr"&gt;commandLine&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;node.exe .\server.js&amp;quot;&lt;/span&gt;
       &lt;span class="attr"&gt;setReadyOnProcessStart&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EntryPoint&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;So if you already have node-inspector (if not, run “npm install node-inspector –g”), you can launch it with the “node-inspector” command, and then change this line in ServiceDefinition.csdef to be:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;EntryPoint&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ProgramEntryPoint&lt;/span&gt; &lt;span class="attr"&gt;commandLine&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;node.exe --debug-brk .\server.js&amp;quot;&lt;/span&gt; 
      &lt;span class="attr"&gt;setReadyOnProcessStart&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;EntryPoint&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Then run Start-AzureEmulator. Happy debugging!&lt;/p&gt;</description><pubDate>Tue, 17 Apr 2012 23:03:12 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/debugging-node-node-inspector-in-the-azure-emulator</guid><category>Azure</category><category>Azure Node SDK</category><category>Azure SDK</category><category>Node.js</category><category>node-inspector</category><category>PowerShell</category></item><item><title>Implementing a Facebook Like Button with Knockout.js</title><link>https://weblogs.asp.net:443/jimwang/implementing-a-facebook-like-button-with-knockout-js</link><description>&lt;p&gt;Recently I’ve been playing around with Knockout.js, and one of the features I wanted to implement was a Facebook like button inside of the details view of a master-detail. Facebook provides the following code snippet for their JavaScript SDK:   &lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;     &lt;pre class="csharpcode"&gt;&amp;lt;div id=&lt;span class="str"&gt;&amp;quot;fb-root&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;script&amp;gt;
    (&lt;span class="kwrd"&gt;function&lt;/span&gt; (d, s, id) {
        &lt;span class="kwrd"&gt;var&lt;/span&gt; js, fjs = d.getElementsByTagName(s)[0];
        &lt;span class="kwrd"&gt;if&lt;/span&gt; (d.getElementById(id)) &lt;span class="kwrd"&gt;return&lt;/span&gt;;
        js = d.createElement(s); js.id = id;
        js.src = &lt;span class="str"&gt;&amp;quot;//connect.facebook.net/en_US/all.js#xfbml=1&amp;amp;appId=10349446178&amp;quot;&lt;/span&gt;;
        fjs.parentNode.insertBefore(js, fjs);
    } (document, &lt;span class="str"&gt;'script'&lt;/span&gt;, &lt;span class="str"&gt;'facebook-jssdk'&lt;/span&gt;));
&amp;lt;/script&amp;gt;&lt;/pre&gt;
    &lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/div&gt;
&lt;/p&gt;



&lt;p&gt;As well as the following markup snippet for the actual like button implementation.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;fb-like&amp;quot;&lt;/span&gt; 
  &lt;span class="attr"&gt;data-send&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;
  &lt;span class="attr"&gt;data-show-faces&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; 
  &lt;span class="attr"&gt;data-href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;www.facebook.com&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Unfortunately, if you simply try the following code – things will not work as you change the details view as the Facebook SDK will not reparse the page to update the URL and render the Like button.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;fb-like&amp;quot;&lt;/span&gt; 
  &lt;span class="attr"&gt;data-send&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; 
  &lt;span class="attr"&gt;data-show-faces&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt; 
  &lt;span class="attr"&gt;data-bind&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;'data-href': myUrl&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Fortunately there’s a simple workaround – create your own binding handler, and then call Facebook’s JS API directly to reparse the markup that you have for the like button. Here’s the binding handler:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;ko.bindingHandlers.likeButton = {
  update: &lt;span class="kwrd"&gt;function&lt;/span&gt; (element, valueAccessor) {
    $(element).attr(&lt;span class="str"&gt;'data-href'&lt;/span&gt;, valueAccessor());
    FB.XFBML.parse();
  }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Note that I can also be more specific by calling FB.XFBML.parse() on the specific element that contains the like button (not the actual like button itself, for reasons I did not investigate further – likely this is an implementation detail on Facebook’s side). Intuitively though, you should probably pick the containing div as a target for the parse() call for the best performance. &lt;/p&gt;

&lt;p&gt;Then simply update your markup to this:&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;fb-like&amp;quot;&lt;/span&gt;
  &lt;span class="attr"&gt;data-send&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;
  &lt;span class="attr"&gt;data-show-faces&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;false&amp;quot;&lt;/span&gt;
  &lt;span class="attr"&gt;data-bind&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;likeButton: myUrl&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;And you’re done!&lt;/p&gt;</description><pubDate>Thu, 23 Feb 2012 20:35:54 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/implementing-a-facebook-like-button-with-knockout-js</guid><category>Ajax</category><category>JavaScript</category><category>Knockout.js</category></item><item><title>The Commoditization of Search Engines?</title><link>https://weblogs.asp.net:443/jimwang/the-commoditization-of-search-engines</link><description>&lt;p&gt;I was reading a Facebook post by a friend today inviting others to try Bing (which currently offers a rewards plan for using it where you can get gift certificates for searching and clicking on sponsored links). I’ve also recently heard about duckduckgo.com, another up and coming search engine. &lt;/p&gt;  &lt;p&gt;For the past few weeks I’ve been rotating between using Google, Bing, and DuckDuckGo, and to be honest, I really can’t tell the difference anymore for most of my searches. If I were to do the same thing last year (when I first switched to Bing), there would be things I would need to fall back to Google for. I think a big part of this is that search in general is getting better, to the point where 90%+ of my searches on any engine will give me a relevant result on the first page.&lt;/p&gt;  &lt;p&gt;This reminds me of what happened with wireless routers back in the day, when they were new, high margin devices and brands like Linksys, D-Link, and Netgear were clearly differentiated by feature sets, reliability, and UI. Don’t get me wrong, the same holds true today, but to be honest margins have dropped and the differences in terms of wireless performance are difficult for an average consumer to grasp. This lack of ability to differentiate a product leads to commoditization, where producers are unable to effectively market their product.&lt;/p&gt;  &lt;p&gt;I think most people would agree today that a wireless router is a commodity. And I would like to think that there are a couple of parallels between that and search engines. Two things jump out at me about the wireless router market:&lt;/p&gt;  &lt;p&gt;1. Figuring out which wireless router to buy is difficult. If you go read user reviews, you will see many 5 star and many 1 star ratings for the typical product. It’s impossible to tell who is credible unless you invest a significant amount of time reading reviews, go with the “average” assessment, or ask your friends what they use.&lt;/p&gt;  &lt;p&gt;2. Due in part to #1, you stick with brands you know. For example, if you’re a Linksys person and you haven’t had issues with your last router, when time comes to replace it you will probably buy another Linksys product.&lt;/p&gt;  &lt;p&gt;When it comes to search engines, I defy you for #1 to say that one search engine is &lt;em&gt;always&lt;/em&gt; better than the other. Folks have their ingrained preferences, but if we were to objectively start from ground zero today (that is, you’ve never used a search engine), I think it would take you a while to figure out which one would work best for you, and even then, unless you have specialized needs such as development work, I would argue the differences are marginal.&lt;/p&gt;  &lt;p&gt;For #2, like with routers, folks aren’t going to switch search engines unless they perceive a problem with their current solution. Let’s face it, most people on Google don’t feel like they have a problem today. Until the thought leaders start switching over to other search engines because of a remarkable improvement, it’s going to be an uphill battle for newcomers to the space, which brings us full circle to why Bing needs to incentivize you to switch.&lt;/p&gt;  &lt;p&gt;What do you think? Feel like search engines are becoming a commodity?&lt;/p&gt;</description><pubDate>Mon, 07 Nov 2011 20:43:13 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/the-commoditization-of-search-engines</guid><category>Random</category><category>Search</category></item><item><title>The Beauty of The Web*</title><link>https://weblogs.asp.net:443/jimwang/the-beauty-of-the-web</link><description>&lt;p&gt;You would think that working on the ASP.NET team you would eventually get jaded by the novelty of the Internet and come to accept it as a fact of daily life. And to some extent this does happen because you’re focusing on the task at hand: pumping features out the door and ensuring that they rock.&lt;/p&gt;  &lt;p&gt;I know it sounds cliché, but this weekend I was reminded of the simplest thing about the Internet: the fact that it allows people from all over the world to collaborate and help one another in real time (sometimes you don’t even need Twitter for that).&lt;/p&gt;  &lt;p&gt;Here’s the story: I had my Mazda up on jack stands because I was planning to drain and replace the transmission and differential fluid. I got the differential fluid done fine, but when it came time to do the transmission, my transmission case looked different from the one in the step-by-step guide, so I was guessing which bolts were the fill and drain. Obviously this was the worst possible time, as I had already jacked up the car, was already dirty, and none of my friends who would have the expertise were available.&lt;/p&gt;  &lt;p&gt;So I whipped out my laptop and posted a picture on Mazda forums, and within minutes somebody had gotten back to me and confirmed where the fill and drain plugs on the transmission were. Maybe I had just inhaled too many fumes, but in that moment, I was very grateful to have the Internet. And more importantly kind connected strangers willing to help a computer guy with his car.&lt;/p&gt;  &lt;p&gt;*IE9 Reference Intentional. &lt;a href="http://www.beautyoftheweb.com"&gt;www.beautyoftheweb.com&lt;/a&gt;&lt;/p&gt;</description><pubDate>Mon, 05 Sep 2011 21:12:38 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/the-beauty-of-the-web</guid><category>Random</category></item><item><title>Technical Talk Preparation–Practice.</title><link>https://weblogs.asp.net:443/jimwang/technical-talk-preparation-practice</link><description>&lt;p&gt;As I’ve been preparing for my talks at DevConnections next week, it’s struck me how talk preparation is one of those things that is immensely enjoyable yet incredibly frustrating (read: time-consuming) at the same time.&amp;#160; &lt;/p&gt;  &lt;h1&gt;&lt;/h1&gt;  &lt;h1&gt;&lt;/h1&gt;  &lt;h1&gt;Why me?&lt;/h1&gt;  &lt;p&gt;What’s so hard about giving talks?&amp;#160; Well, being in a programmer role, this is one of those things that most people dread, and for good reason: it’s a lot of work and there’s a lot of pressure. But perhaps more importantly, you don’t get a lot of practice doing it.&amp;#160; And this turns out to be incredibly important both in general and specific cases.&lt;/p&gt;  &lt;h1&gt;How did you become a good programmer?&lt;/h1&gt;  &lt;p&gt;Nobody ever sits down at a computer and instantly is a master programmer.&amp;#160; Skill in programming, like any discipline, is learned, molded, and &lt;u&gt;practiced,&lt;/u&gt; typically in a relatively relaxed environment where you get to collaborate with more experienced people who can give you feedback about your code. In my opinion, this is one of the reason open source projects tend to do so well.&amp;#160; If you didn’t have to practice to get good, well, congratulations, you’re some kind of super genius, but I would say most people aren’t like you :).&lt;/p&gt;  &lt;h1&gt;So What?&lt;/h1&gt;  &lt;p&gt;At this point, you’re probably wondering what this observation has to do with giving technical presentations.&amp;#160; Well aside from reading a list of tips, which is really useful and great, there is the underlying &lt;em&gt;principle&lt;/em&gt; of getting better at anything.&amp;#160; How do you build a better coder?&amp;#160; I like to think of it in terms of three major categories:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Mentoring from experienced people: Code reviews, chatting with your managers and senior developers&lt;/li&gt;    &lt;li&gt;Practicing: Getting hands on experience doing what it is you want to get better at, so in this case, writing code&lt;/li&gt;    &lt;li&gt;Learning: This is an obvious but important point.&amp;#160; &lt;strong&gt;Practice and mentoring are worthless unless you learn from them and do things differently.&amp;#160; &lt;/strong&gt;Don’t make the same mistakes.&amp;#160; Learn new things.&amp;#160; Keep getting better.&amp;#160; My piano teacher always said: don’t trick yourself into thinking that doing something wrong 100 times is practice: &lt;u&gt;it’s not&lt;/u&gt;.&amp;#160; It’s better to do it right even just once.&lt;/li&gt; &lt;/ul&gt;  &lt;h1&gt;What about my talks?&lt;/h1&gt;  &lt;p&gt;And so dear reader, if you’re still with me at this point, we come now to the crux of the matter.&amp;#160; Most programmers have never had experience giving technical presentations, and thus never really had a change to practice or get good at it.&amp;#160; Even for those of us who have, how often do you do it? That’s why &lt;a href="http://www.hanselman.com/blog/11TopTipsForASuccessfulTechnicalPresentation.aspx"&gt;Scott’s Post&lt;/a&gt; is so relevant: a lot of us simply don’t do presentations often enough to remember all of these things and get better at them.&amp;#160; I myself am guilty of this, and find that every time I have to do talks I need to rebuild some of my expertise, and this takes some time.&lt;/p&gt;  &lt;h1&gt;&lt;/h1&gt;  &lt;h1&gt;Fine, but why do I care? Let Scott do the demos.&lt;/h1&gt;  &lt;p&gt;Technical presentation skills are highly effective and transferrable to your day to day work.&amp;#160; The core discipline is to communicate technical information as effectively as possible, and we all do this in our day to day work.&amp;#160; More recently, our QA team has started recording bug repro videos for the developer team to use.&amp;#160; Getting good at these is a great stepping stone to improving your presentation skills: nobody wants to watch a video of a bug report where you are saying “uhm” and “errrrr” all the time.&amp;#160; I’ve also heard good things about Toastmasters as a way to get better by practicing, but YMMV.&lt;/p&gt;  &lt;h1&gt;Okay I believe you.&amp;#160; How do I get better?&lt;/h1&gt;  &lt;p&gt;By now you probably know the answer.&amp;#160; Practice.&amp;#160; Like crazy.&amp;#160; But look for opportunities to practice.&amp;#160; Whether it’s giving a small presentation to your team, or maybe to your boss, or even getting good at shooting small videos, these things add up to being a better presenter.&amp;#160; One of the things that helped me greatly was doing joint talks at first, with &lt;a href="http://twitter.com/jsenior"&gt;James Senior&lt;/a&gt; and also with Simon Calvert.&amp;#160; I got to see first hand how experienced speakers prepared for talks, structured content, and kept the audience engaged.&lt;/p&gt;  &lt;p&gt;My biggest three tips are:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Keep the audience engaged and involved&lt;/strong&gt;.&amp;#160; James Senior taught me this one first hand, and watching Scott Hanselman present has really driven this point home for me.&amp;#160; People aren’t there just to learn from your content, they are there to be entertained and kept awake.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Provide compelling content.&amp;#160; &lt;/strong&gt;Tell a story.&amp;#160; Nobody wants to see you go up there and rattle on about a boilerplate list of new features when they don’t see how it could map to their day to day work.&amp;#160; Don’t expect anyone to make the leap on their own.&amp;#160; &lt;strong&gt;Show them.&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Practice.&amp;#160; &lt;/strong&gt;Know your talk and your content.&amp;#160; Time your slides.&amp;#160; Set up dry runs.&amp;#160; Go over the talk until you know it by heart.&amp;#160; It’s funny because you would think that this leads to a scripted delivery (and to be fair you should be careful that you aren’t doing this).&amp;#160; On the contrary, I’ve found that it allows you to be flexible when questions do pop up –&amp;gt; you can recover much easier and also go off the beaten path if you sense the audience is interested.&amp;#160; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I do have to credit Simon Calvert with teaching me the importance of #3.&amp;#160; I think few people put in the tremendous effort to deliver a phenomenal show for our customers.&amp;#160; For all the blog posts and tweets and books I have and could have read, none of them resonated with me more than sitting down with a mentor and learning, apprentice-style, from a master.&amp;#160; I encourage you all to find these people in your circle and follow in their footsteps.&amp;#160; Happy practicing!&lt;/p&gt;</description><pubDate>Fri, 25 Mar 2011 00:53:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/technical-talk-preparation-practice</guid><category>DevConnections</category><category>Presentations</category><category>Random</category></item><item><title>CodingQA</title><link>https://weblogs.asp.net:443/jimwang/codingqa</link><description>&lt;p&gt;For those of you who have heard about it, &lt;a href="http://www.testingtoasters.com/"&gt;Mark Berryman&lt;/a&gt; and I are taking over the &lt;a href="http://www.codingqa.com/"&gt;CodingQA&lt;/a&gt; podcast from Matthew Osborn and Federico Silva Armas.&lt;/p&gt;  &lt;p&gt;In our first episode, we talk about the different roles –&amp;gt; how developers and testers work together, and how it’s not about the people, but sometimes about the part they play.&amp;#160; &lt;a href="http://www.codingqa.com/episode-51-new-owners-and-testers-as-developers"&gt;Check it out&lt;/a&gt;, I promise more episodes to come :)&lt;/p&gt;</description><pubDate>Mon, 07 Mar 2011 04:59:39 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/codingqa</guid><category>CodingQA</category><category>Testing</category></item><item><title>Keyboard locking up in Visual Studio 2010, Part 2</title><link>https://weblogs.asp.net:443/jimwang/keyboard-locking-up-in-visual-studio-2010-part-2</link><description>&lt;p&gt;Last week I posted about looking into the keyboard locking up issue in Visual Studio.&amp;#160; So far it looks like not a lot of people have replied to provide concrete repro steps, which confirms my suspicion that this is somewhat of a random issue.&lt;/p&gt;  &lt;p&gt;So at this point, I have a couple of choices.&amp;#160; I can either wait for somebody in the community to provide a repro of the problem that I can reliably run into, or I can do the work myself.&lt;/p&gt;  &lt;p&gt;I’m going to do both, so while I’m waiting for more possible bug reports, I’m going to write a tool that models the behavior of a typical Visual Studio user and use that to hopefully isolate the problem.&lt;/p&gt;  &lt;p&gt;I’ve chosen to go with this path since given the information in the bug reports, it seems people hit the issue with many different configurations in many different scenarios.&amp;#160; This means that me sitting down without any solid repro steps is likely not going to be a good use of time.&amp;#160; Instead, I’m going to go with a &lt;a href="http://en.wikipedia.org/wiki/Model-based_testing"&gt;model-based testing&lt;/a&gt; approach where I will define a series of actions that a user in VS can do, and then proceed to run my model.&amp;#160; I’ll let you guys know how this works out for isolating bugs :)&lt;/p&gt;  &lt;p&gt;I’m using an internal tool for the model engine and &lt;a href="http://www.autoitscript.com/site/"&gt;AutoIt&lt;/a&gt; for the UI automation (I want something lightweight for a one-off).&amp;#160; One of the challenges will be getting feedback: AutoIt is great at driving, but not so great at understanding what success and failure means.&lt;/p&gt;</description><pubDate>Wed, 02 Mar 2011 00:55:03 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/keyboard-locking-up-in-visual-studio-2010-part-2</guid><category>ASP.NET</category><category>ASP.NET 4</category><category>Tactial Test Team</category><category>Testing</category><category>Visual Studio 2010</category></item><item><title>Keyboard locking up in Visual Studio 2010</title><link>https://weblogs.asp.net:443/jimwang/keyboard-locking-up-in-visual-studio-2010</link><description>&lt;p&gt;One of the initiatives I’m involved with on the ASP.NET and Visual Studio teams is the Tactical Test Team (TTT), which is a group of testers who dedicate a portion of their time to roaming around and testing different parts of the product.&amp;nbsp; What this generally translates to is a day and a bit a week helping out with areas of the product that have been flagged as risky, or tackling problems that span both ASP.NET and Visual Studio.&amp;nbsp; There is also a separate component of this effort outside of TTT which is to help with customer scenarios and design.&lt;/p&gt;  &lt;p&gt;I enjoy being on TTT because it allows me the opportunity to look at the entire product and gain expertise in a wide range of areas.&amp;nbsp; This week, I’m looking at Visual Studio 2010 performance problems, and this gem with the keyboard in Visual Studio locking up ended up catching my attention.&lt;/p&gt;  &lt;p&gt;First of all, here’s a link to one of the many Connect bugs describing the problem:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://connect.microsoft.com/VisualStudio/feedback/details/574500/backspace-stops-working-in-aspx-ascx-files-after-left-open-for-a-while" mce_href="http://connect.microsoft.com/VisualStudio/feedback/details/574500/backspace-stops-working-in-aspx-ascx-files-after-left-open-for-a-while"&gt;Microsoft Connect&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I like this problem because it really highlights the challenges of reproducing customer bugs.&amp;nbsp; There aren’t any clear steps provided here, and I don’t know a lot about your environment: not just the basics like our OS version, but also what third party plug-ins or antivirus software you might be running that might contribute to the problem.&amp;nbsp; In this case, my gut tells me that there is more than one bug here, just by the sheer volume of reports.&amp;nbsp; Here’s another thread where users talk about it:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/567055" mce_href="https://connect.microsoft.com/VisualStudio/feedback/details/567055"&gt;Microsoft Connect&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The volume and different configurations are staggering.&amp;nbsp; From a customer perspective, this is a very clear cut case of basic functionality not working in the product, but from our perspective, it’s hard to find something reproducible: even customers don’t quite agree on what causes the problem (installing ReSharper seems to cause a problem…or does it?).&lt;/p&gt;  &lt;p&gt;So this then, is the start of a QA investigation. If anybody has isolated repro steps (just comment on this post) that they can provide this will immensely help us nail down the issue(s), but I’ll be doing a multi-part series on my progress and methodologies as I look into the problem.&lt;/p&gt;</description><pubDate>Thu, 24 Feb 2011 01:55:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/keyboard-locking-up-in-visual-studio-2010</guid><category>.NET 4.0</category><category>ASP.NET</category><category>ASP.NET 4</category><category>Bugs</category><category>Tactical Test Team</category><category>Testing</category><category>Visual Studio 2010</category></item><item><title>Windows Phone 7 Dev Deployment</title><link>https://weblogs.asp.net:443/jimwang/windows-phone-7-dev-deployment</link><description>&lt;p&gt;Recently, I’ve been playing around with the Windows Phone 7 Developer experience.&amp;#160; Quick tip: I tried to deploy my application to the phone, and got an error: “Zune software is not launched. Retry after making sure that Zune software is launched.”&amp;#160; This wasn’t particularly helpful for me since I did have the software launched, and my phone was connected through wireless sync (didn’t remember this at the time).&amp;#160; &lt;/p&gt;  &lt;p&gt;A quick search turned up nothing, and restarting the client didn’t help.&amp;#160; But then I remembered my setup and plugged my phone straight into the USB port and then had no problems.&lt;/p&gt;  &lt;p&gt;Thinking about it, I wouldn’t expect this scenario to work, but there was no indication of this provided to me as a devt.&lt;/p&gt;  &lt;p&gt;A couple of takeaways as a tester and geek:&lt;/p&gt;  &lt;p&gt;1. Bad error messages cause customers a lot of pain.&amp;#160; Fighting for these in triage is probably worth your time.&lt;/p&gt;  &lt;p&gt;2. Wired &amp;gt; Wireless, even in 2011 :)&lt;/p&gt;</description><pubDate>Sun, 20 Feb 2011 02:05:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/windows-phone-7-dev-deployment</guid><category>Deployment</category><category>Testing</category><category>Windows Phone 7</category></item><item><title>DevConnections Orlando</title><link>https://weblogs.asp.net:443/jimwang/devconnections-orlando</link><description>&lt;p&gt;If all goes well I’ll be speaking about WebMatrix and NuGet this March at &lt;a href="http://devconnections.com/conf/default.aspx?s=159"&gt;DevConnections Orlando&lt;/a&gt;! I always enjoy coming out to conferences and meeting customers who work on the Microsoft stack. When I went to DevConnections Las Vegas in 2009 it was to talk about what was new in ASP.NET Web Forms, and it was really great to hear all the community feedback about the new features we were delivering.&amp;#160; I look forward to seeing you all in March and talking about the new web development paradigm we are delivering with WebMatrix.&amp;#160; Till then!&lt;/p&gt;</description><pubDate>Wed, 16 Feb 2011 03:03:36 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/devconnections-orlando</guid><category>Conferences</category><category>DevConnections</category><category>WebMatrix</category></item><item><title>Getting Wishlist through _admin in WebMatrix</title><link>https://weblogs.asp.net:443/jimwang/getting-wishlist-through-admin-in-webmatrix</link><description>&lt;p&gt;Put together this video showing how easy it is to install Wishlist now that we have shipped on &lt;a href="http://www.nuget.org" mce_href="http://www.nuget.org"&gt;www.nuget.org&lt;/a&gt; :)&amp;nbsp; Note that the best thing to do will be to watch in 1080p.&lt;/p&gt;
&lt;iframe title="YouTube video player" height="300" src="http://www.youtube.com/embed/JboFgKMSpLQ?hd=1" frameBorder="0" width="500" allowfullscreen=""&gt;&lt;/iframe&gt;</description><pubDate>Tue, 08 Feb 2011 01:21:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/getting-wishlist-through-admin-in-webmatrix</guid><category>ASP.NET Web Pages</category><category>WebMatrix</category><category>Wishlist</category></item><item><title>Happy New Year! Back to school :)</title><link>https://weblogs.asp.net:443/jimwang/happy-new-year-back-to-school</link><description>&lt;p&gt;A brand new year is upon us and it’s time to get cracking with WebMatrix again…and go back to school :).&amp;#160; Last year we ran a successful product walkthrough for WebMatrix Beta 2 with our students from around the world, gathering awesome feedback for the final version of WebMatrix which is coming soon!&amp;#160; I’d like to take this chance to thank all the students who participated in this effort…you have really helped make the final product much better than it would have been otherwise.&lt;/p&gt;  &lt;p&gt;In 2011, we’re looking, as always, at bigger and better things.&amp;#160; One of the ideas that has been floating around is the concept of a WebMatrix college course that you could take for actual credit.&amp;#160; Of course, this is going to require coordination with college educators, but we think we’re up to the challenge :) &lt;/p&gt;  &lt;p&gt;If your school is still using an antiquated language to teach their web development 101 course, and you’d like to switch to WebMatrix, we’d like to hear your voice – better yet if you have contacts from your school and would like to be one of the first to give the program a try!&amp;#160; Comment on this post or email wptsdrext at microsoft.com.&amp;#160; We look forward to partnering with you guys ^^.&lt;/p&gt;</description><pubDate>Thu, 06 Jan 2011 01:51:28 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/happy-new-year-back-to-school</guid><category>ASP.NET</category><category>ASP.NET 4</category><category>University</category><category>WebCamps</category><category>WebMatrix</category></item><item><title>Web Camps TV #10–WebMatrix Beta 2</title><link>https://weblogs.asp.net:443/jimwang/web-camps-tv-10-webmatrix-beta-2</link><description>&lt;p&gt;James Senior and I are at it again, this time in my office :).&amp;#160; Check out the newest video on WebMatrix Beta 2 where we discuss Themes, Package Manager, Helpers, and the new HTML 5 templates &lt;a href="http://channel9.msdn.com/Shows/Web+Camps+TV/Web-Camps-10-WebMatrix-Beta-2-Themes-Package-Manager-NuPack-HTML-5-templates-and-more"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Wed, 20 Oct 2010 18:32:29 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/web-camps-tv-10-webmatrix-beta-2</guid><category>ASP.NET</category><category>Channel9</category><category>Helpers</category><category>Razor</category><category>WebMatrix</category></item><item><title>Interview on WebCamps</title><link>https://weblogs.asp.net:443/jimwang/interview-on-webcamps</link><description>For those of you who follow Channel9, I recently did an interview with James Senior (@jsenior) about the new ASP.NET Web Pages Helpers.  Check it out &lt;a href="http://channel9.msdn.com/shows/Web+Camps+TV/Web-Camps-TV-3-WebMatrix-Helpers-with-Jim-Wang/"&gt;here&lt;/a&gt; and let me know if you have any questions :)</description><pubDate>Sun, 12 Sep 2010 07:35:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/interview-on-webcamps</guid><category>ASP.NET</category><category>ASP.NET Web Pages</category><category>Helpers</category><category>WebMatrix</category></item><item><title>Wishlist</title><link>https://weblogs.asp.net:443/jimwang/wish-list</link><description>&lt;p&gt;Hello everybody!&amp;#160; It’s been a looong while since my last post and a lot has happened since then.&amp;#160; I switched from working on ASP.NET Ajax to ASP.NET WebPages (using the “Razor” syntax), and until recently, WebMatrix and ASP.NET WebPages haven’t been public, so I couldn’t blog about the awesome feature set that we’ve been building out.&amp;#160; There are numerous posts on the release, the most prominent of which is on &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx"&gt;ScottGu’s Blog&lt;/a&gt;.&amp;#160; Another good overview for WebMatrix can be found on the &lt;a href="http://www.codingqa.com/index.php?post_id=629871"&gt;Coding QA Blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So what have I been up to?&amp;#160; Once of the things that Coding QA talks about in Episode 33 is our &lt;a href="http://www.codingqa.com/index.php?post_id=588510"&gt;team structure&lt;/a&gt;.&amp;#160; Starting in January, I joined the Product Presence pillar and started contributing to product design and testing from a customer perspective.&amp;#160; One of the things that we did as part of this highly effective process was build an application, the Wishlist.&amp;#160; The idea is that it allows users to create lists of items they would like others to purchase for them.&amp;#160; We got to the point where we had enough feature coverage that we decided it would make sense to ship it as a ASP.NET WebPages template.&amp;#160; In this post we’ll discuss getting started with the template from a user perspective and run through a high-level feature overview, touching on places where we’ve used ASP.NET WebPages helpers and functionality.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_223DE48D.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_5599A7E9.png" width="500" height="249" /&gt;&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can get started by downloading the &lt;a href="http://aspnet.codeplex.com/releases/view/49517"&gt;Wishlist template&lt;/a&gt;.&amp;#160; Assuming you’ve already installed WebMatrix, you can extract the zip and then open up the site “From Folder” in WebMatrix.&amp;#160; Then, you’ll be tasked with changing some initial settings in _Start.cshtml to set up ReCaptcha and email, so that registration will work with a ReCaptcha, and email will be sent for user confirmation, and in the case of a user forgetting their password.&amp;#160; You can register for ReCaptcha public and private keys at &lt;a href="http://www.recaptcha.net"&gt;www.recaptcha.net&lt;/a&gt;.&amp;#160; As for email, the configuration allows you to set the SMTP server, port, and whether or not you need to use SSL.&amp;#160; By default, the template is set up to work with Hotmail if you simply enter UserName, From, and Password.&amp;#160; UserName/From is going to be your Hotmail e-mail address, and password is going to be your password.&amp;#160; I recommend setting these parameters so you get a good feel for the end-to-end functionality of the site as originally intended :)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Tip: If you don’t want to set up email or ReCaptcha, you can still use the template normally…mail will not be sent and you will be able to use the links directly in the page&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Registration&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Now that you’ve set up Mail and ReCaptcha, you can Register your user account.&amp;#160; By default, Wishlist takes advantage of the user confirmation feature in SimpleMembership (Matthew Osborn has a detailed post about SimpleMembership &lt;a href="http://blog.osbornm.com/archive/2010/07/21/using-simplemembership-with-asp.net-webpages.aspx"&gt;here&lt;/a&gt;), and will send mail to the user asking them to confirm the account before they can login.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_3553299A.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_4D0A6100.png" width="583" height="768" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After you have registered and confirmed your account, you can login (there’s also a Forgot Password feature that takes advantage of the recovery question and sends an email which I will cover in a future post) where you will be greeted with this UI:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_5B744B82.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_1E7019F0.png" width="500" height="248" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I’m not going to go into all feature areas in extreme detail, but one thing you will notice is that you can edit properties in your Profile.&amp;#160; This is what you would expect, it allows you to change your email and your password.&amp;#160; Let’s go ahead and create a list by clicking on “Create List”.&amp;#160; I’m going to call it Christmas, with a blank description.&amp;#160; You’ll notice that jQuery validate is enabled, and I will get a client side validation error before I go back to the server:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_59574CB9.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_633C3E24.png" width="500" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now I can create the list.&amp;#160; So now there are two lists:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_501B1178.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_19C9E969.png" width="500" height="295" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The UI allows you to make a list default, and also there is an [x] to delete a list.&amp;#160; If I click on this, I get presented with a jQuery dialog, which works as you would expect.&amp;#160; The “Default” feature allows me to navigate to &lt;a href="http://localhost/wishlist/displaylist/username"&gt;http://localhost/wishlist/displaylist/username&lt;/a&gt; and have that list displayed.&amp;#160; For details on how this works, see DisplayList.cshtml.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_147B02B8.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_16F40EA9.png" width="500" height="287" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note that I can also click on the “Edit” button or icon and modify the name or description of my list.&amp;#160; If I click on the name of the list, I will be presented with this UI:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_35CA8287.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_0DB7D368.png" width="500" height="248" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You’ll notice that this allows you to add items to the list, as you would expect.&amp;#160; There’s also a LinkShare (a helper available in ASP.NET WebPages), which allows me to easily share out the link to my list via Digg, Delicious, Buzz, Facebook, Reddit, StumbleUpon, or Twitter.&amp;#160; Here’s what the page looks like after I’ve added my awesome car to it:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_0CDF6D7E.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_6B7FC7E1.png" width="500" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You’ll notice that there is a “Claimed” field.&amp;#160; You can change the value of this field via the “Edit” button, or if you log out and navigate to the same page again, you can claim the item, as this screenshot shows:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_7C83F5C4.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_68F69623.png" width="500" height="257" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This page, as well as the “Manage Site” page we’ll look at later, make use of the WebGrid helper to display information from the database, which enables sorting and paging functionality out of the box.&amp;#160; The last page we’ll take a look at is the “Manage Site” page (UserManagement.cshtml).&amp;#160; I’ve added another user, which has an email with an associated Gravatar.&amp;#160; You can see that this page lets me perform administration tasks for my users.&amp;#160; It also shows me if they have been confirmed or not, and has Ajax functionality enabled for the WebGrid so you can perform operations without causing a full postback to the server.&amp;#160; You can also click on selection to update a user's first and last name, email, and toggle whether or not they are an administrator.&lt;/p&gt;  &lt;p&gt;&lt;a href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_4C992E36.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="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_241A4C22.png" width="500" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This has been a very brief high-level overview of the Wishlist site.&amp;#160; I plan to do more posts in the future where I look at particular pages in detail.&amp;#160; Please post your feedback on the &lt;a href="http://forums.asp.net/1224.aspx"&gt;WebMatrix forums&lt;/a&gt; or comment here for any issues or suggestions you have.&amp;#160; Thanks!&lt;/p&gt;</description><pubDate>Sat, 24 Jul 2010 01:13:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/wish-list</guid><category>ASP.NET</category><category>Razor</category><category>WebMatrix</category></item><item><title>DevConnections 2009</title><link>https://weblogs.asp.net:443/jimwang/devconnections-2009</link><description>&lt;P&gt;Thanks to everybody who showed up at the talk that Simon Calvert and I gave on an overview of ASP.NET 4 Webforms!&amp;nbsp; Your participation and feedback were much appreciated, and as promised, I’ve attached the demo that Simon and I built live, as well as the slide deck, to this post.&amp;nbsp; For those of you who missed it, the talk gives an overview of the SEO/Routing improvements, XHTML 1.1 compliance, ClientID control, ViewState reduction, CSS improvements, Microsoft Ajax Preview 6 updates, Dynamic Data in 4.0, QueryExtender, and the Chart Control.&amp;nbsp; There was a lot to cover in an hour :).&amp;nbsp; For those who went to the Ajax talk I did with James Senior, here’s a link to the &lt;A href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34488#ReleaseFiles" mce_href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=34488#ReleaseFiles"&gt;Preview 6 download&lt;/A&gt; directly with the samples.&amp;nbsp; Enjoy the demos and deck, note that the demos require VS 2010 Beta 2, which you can get &lt;A href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx" mce_href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx"&gt;here&lt;/A&gt;.&amp;nbsp; &lt;STRONG&gt;NOTE: The demos attached to this post need you to drop your own copy of the NorthwindDatabase and the AspNet DB (the AspNET DB is in the default ASP.NET 4 templates).&amp;nbsp; I ran into an upload&amp;nbsp;file size&amp;nbsp;limitation on community server.&amp;nbsp; If you would like the full demo with the databases&amp;nbsp;I have a &lt;A href="http://rapidshare.com/files/305262427/DemosAndDeck.zip.html" mce_href="http://rapidshare.com/files/305262427/DemosAndDeck.zip.html"&gt;RapidShare link here&lt;/A&gt;.&amp;nbsp; Note that the admin user/password is Jim/aspNET&lt;/STRONG&gt;&lt;/P&gt;</description><pubDate>Wed, 11 Nov 2009 01:32:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/devconnections-2009</guid><category>ASP.NET 4</category><category>ASP.NET AJAX Preview 6</category><category>Chart Control</category><category>ClientID</category><category>Dynamic Data</category><category>QueryExtender</category><category>Routing</category><category>XHTML 1.1</category></item><item><title>ASP.NET Ajax Preview 5 and Application Services</title><link>https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-5-and-application-services</link><description>&lt;P&gt;Recently there was an issue posted to the ASP.NET customer forums where&amp;nbsp; somebody was having problems using Profile Services with ASP.NET Ajax Preview 5.&amp;nbsp; The reason is that the scripts for Application Services have been moved to a separate script file (to improve script download size).&amp;nbsp; We did not include the script in the Preview 5 release however, so if you want to use Preview 5 with Application Services features, you need to work around by taking the Sys.Services code and merging it into the Preview 5 MicrosoftAjax.js file.&amp;nbsp; For your convenience and at &lt;A href="http://weblogs.asp.net/infinitiesloop/" mce_href="http://weblogs.asp.net/infinitiesloop/"&gt;Dave Reed’s&lt;/A&gt; suggestion, I’ve gone ahead and done this, so if you are targeting this scenario, use the new versions of MicrosoftAjax.js and MicrosoftAjax.debug.js that are included in the zip file attached to this post.&lt;/P&gt;</description><pubDate>Wed, 30 Sep 2009 18:15:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-5-and-application-services</guid><category>ASP.NET</category><category>ASP.NET AJAX</category><category>ASP.NET AJAX Preview 5</category></item><item><title>ASP.NET Ajax Preview 5 and UpdatePanel</title><link>https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-5-and-updatepanel</link><description>&lt;P&gt;Many of you have probably heard that we’ve released &lt;A href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32770" mce_href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32770"&gt;ASP.NET Ajax Preview 5&lt;/A&gt; on Codeplex, and it’s available &lt;A href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32770" mce_href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=32770"&gt;here&lt;/A&gt;.&amp;nbsp; Aside from all the cool updates to the codebase, Preview 5 also includes some updated samples, as well as support for UpdatePanel when using ASP.NET 3.5 SP1.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Previously, this didn’t work because of updates to the scripts for compatibility with 4.0.&amp;nbsp; Now, with this fixed, you can easily add Ajax Preview 5 functionality to existing sites and enjoy continued operation.&amp;nbsp; There is a very simple example included with the Preview 5 samples that demonstrates this functionality (8_UpdatePanel.aspx under the 1_Basic_DataView folder).&amp;nbsp; I’ll quickly cover here how to get your existing UpdatePanel working with the new Preview bits.&lt;/P&gt;
&lt;P&gt;Basically, all you need to have is an additional ScriptReference to the included MicrosoftAjaxWebForms.js file for Preview 5 to work with the UpdatePanel.&amp;nbsp; So your ScriptManager should look something like this:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptManager&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sm1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MicrosoftAjax.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjax.js"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MicrosoftAjaxWebForms.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjaxWebForms.js"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptManager&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;    &lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;This will allow you use any UpdatePanels that you have on the page in exactly the same way you did in 3.5 SP1, while providing the flexibility for you to include other Ajax Preview scripts and start using those features side-by-side.&lt;/P&gt;
&lt;P&gt;I would argue one step further, however, and state that in many cases, where you were using an UpdatePanel before, you can now move to using ADO.NET web services coupled with the Preview 5 scripts.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To illustrate this, let’s take a look at an old school sample using UpdatePanel and GridView.&amp;nbsp; &lt;A href="http://www.asp.net/AJAX/Documentation/Live/ViewSample.aspx?sref=UpdatePanelTutorialSibling%23DataEntry.aspx" mce_href="http://www.asp.net/AJAX/Documentation/Live/ViewSample.aspx?sref=UpdatePanelTutorialSibling%23DataEntry.aspx"&gt;This sample&lt;/A&gt; illustrates using the UpdatePanel and GridViews to create a simple read-only employee name entry system.&amp;nbsp; A screenshot is shown below:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/blogs/jimwang/image_56121353.png" mce_href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_56121353.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://weblogs.asp.net/blogs/jimwang/image_thumb_4284B3B2.png" width=420 height=100 mce_src="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_4284B3B2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;We’re going to put this sample to shame using Preview 5.&lt;/P&gt;
&lt;P&gt;There’s 146 lines of markup in this page, and every time you hit “Insert”, you’re looking at a partial-page postback, which has to hit the server to do processing, pull down the data for the new page, and then update the appropriate portions.&lt;/P&gt;
&lt;P&gt;If instead we use a DataView hooked up to an ADO.NET data context, we can build a similar application which will be much more efficient (dealing with JSON instead of full sets of page data on the wire), much shorter, and much simpler.&amp;nbsp; Let’s begin.&lt;/P&gt;
&lt;P&gt;Since we already have the samples, let’s create a new .aspx page, Employees.aspx, under the 1_Basic_DataView folder.&amp;nbsp; Let’s set up the following ScriptManager:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptManager&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ID&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sm1"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;runat&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="server"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MicrosoftAjax.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjax.js"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Name&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="MicrosoftAjaxWebForms.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjaxWebForms.js"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjaxTemplates.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ScriptMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Inherit"&lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjaxDataContext.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ScriptMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Inherit"&lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptReference&lt;/SPAN&gt; &lt;SPAN class=attr&gt;Path&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="~/MicrosoftAjax/MicrosoftAjaxAdoNet.js"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;ScriptMode&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="Inherit"&lt;/SPAN&gt;  &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;Scripts&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;asp:ScriptManager&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;    &lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Users of previous previews might recognize that there is a new file here, MicrosoftAjaxDataContext.js, which now contains the DataContext and AdoNetDataContext classes.&amp;nbsp; Of course, these classes become more useful in read/write scenarios, but I’m going to use them in this read-only example for illustration purposes.&lt;/P&gt;
&lt;P&gt;Let’s also take this opportunity to set up our &amp;lt;body&amp;gt; tag for DataView use by adding the appropriate namespaces.&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;body&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns:sys&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="javascript:Sys"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;xmlns:dv&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="javascript:Sys.UI.DataView"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;Also remember to add the .sys-template style to your &amp;lt;head&amp;gt; section:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;style&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text/css"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    .sys-template {display:none}
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;style&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;So now we’re ready to add our AdoNetDataContext. Let’s set up our pointer to the service:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;script&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text/javascript"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
        &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; myDC = &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; Sys.Data.AdoNetDataContext();
        myDC.set_serviceUri(&lt;SPAN class=str&gt;"../Services/ImagesDataService.svc"&lt;/SPAN&gt;);
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;script&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;So here I’ve created a new AdoNetDataContext and pointed its serviceUri to my ADO.NET Data Service.&amp;nbsp; Now I’m going to set up a DataView to query this service for People so that I can get a list.&amp;nbsp; So I enter the following markup:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="inputTable"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    First Name: &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;input&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="firstNameInput"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    Last Name: &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;input&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="lastNameInput"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;type&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="text"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;href&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;onclick&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="insertPerson()"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Insert&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    &lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt; &lt;SPAN class=attr&gt;href&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="#"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;onclick&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="cancelPerson()"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;Cancel&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;a&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;Employees:&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt; &lt;SPAN class=attr&gt;id&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="employeeView"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;class&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="sys-template"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;sys:attach&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="dv"&lt;/SPAN&gt; 
                    &lt;SPAN class=attr&gt;dv:dataprovider&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="{{myDC}}"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;dv:autofetch&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="true"&lt;/SPAN&gt; &lt;SPAN class=attr&gt;dv:fetchoperation&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;="People"&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;
    {{FirstName}} {{LastName}}&lt;SPAN class=kwrd&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=html&gt;br&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;/&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class=kwrd&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN class=html&gt;div&lt;/SPAN&gt;&lt;SPAN class=kwrd&gt;&amp;gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;So here I’m setting my DataView’s dataprovider to the AdoNetDataContext that I created, turning on autofetch, and specifying the fetchoperation to query for “People” from the database.&amp;nbsp; I’ve also set up a simple UI which includes links to the insertPerson() and cancelPerson() JS functions, which I’m going to write now:&lt;/P&gt;&lt;PRE class=csharpcode&gt;&lt;FONT size=1&gt;&lt;SPAN class=kwrd&gt;function&lt;/SPAN&gt; insertPerson() {
    &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; firstName = $get(&lt;SPAN class=str&gt;"firstNameInput"&lt;/SPAN&gt;).value;
    &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; lastName = $get(&lt;SPAN class=str&gt;"lastNameInput"&lt;/SPAN&gt;).value;
    &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (firstName != &lt;SPAN class=str&gt;""&lt;/SPAN&gt; &amp;amp;&amp;amp; lastName != &lt;SPAN class=str&gt;""&lt;/SPAN&gt;) {
        &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; myObject = {
            FirstName: firstName,
            LastName: lastName
        }
        myDC.insertEntity(myObject, &lt;SPAN class=str&gt;"People"&lt;/SPAN&gt;);
        &lt;SPAN class=kwrd&gt;var&lt;/SPAN&gt; data = $find(&lt;SPAN class=str&gt;"employeeView"&lt;/SPAN&gt;).get_data();
        Sys.Observer.insert(data, data.length, myObject);
        $get(&lt;SPAN class=str&gt;"firstNameInput"&lt;/SPAN&gt;).value = &lt;SPAN class=str&gt;""&lt;/SPAN&gt;;
        $get(&lt;SPAN class=str&gt;"lastNameInput"&lt;/SPAN&gt;).value = &lt;SPAN class=str&gt;""&lt;/SPAN&gt;;
    } &lt;SPAN class=kwrd&gt;else&lt;/SPAN&gt; {
        alert(&lt;SPAN class=str&gt;"You must enter a first and last name!"&lt;/SPAN&gt;);
    }
}
&lt;SPAN class=kwrd&gt;function&lt;/SPAN&gt; cancelPerson() {
    $get(&lt;SPAN class=str&gt;"firstNameInput"&lt;/SPAN&gt;).value = &lt;SPAN class=str&gt;""&lt;/SPAN&gt;;
    $get(&lt;SPAN class=str&gt;"lastNameInput"&lt;/SPAN&gt;).value = &lt;SPAN class=str&gt;""&lt;/SPAN&gt;;
}&lt;/FONT&gt;&lt;/PRE&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;So basically in insertPerson(), I’m creating a person object based on the first and last name that were entered by the user (assuming they weren’t blank), and inserting an entity into my AdoNetDataContext.&amp;nbsp; For the purposes of this example, this isn’t strictly necessary, but I do it here for illustration purposes (in case you want to add read/write later).&amp;nbsp; Then, I simply need to update the rendered data on the client, and I do so using the insert method of the Sys.Observer class, which allows me to insert the person object in a way that is recognized by the DataView.&amp;nbsp; Then I clear the input fields for the next person to be entered.&amp;nbsp; In cancelPerson(), I’m doing something similar, where I simply clear the input fields.&lt;/P&gt;
&lt;P&gt;Of course, it’s easy to add read/write scenarios to this sample.&amp;nbsp; I encourage you to check out the ImageOrganizer sample and associated code there for further examples.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/blogs/jimwang/image_13BEFB10.png" mce_href="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_13BEFB10.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://weblogs.asp.net/blogs/jimwang/image_thumb_3A20DE5B.png" width=240 height=230 mce_src="https://aspblogs.blob.core.windows.net/media/jimwang/Media/image_thumb_3A20DE5B.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So there you have it.&amp;nbsp; Although it doesn’t do exactly what the UpdatePanel sample does, it’s essentially the same idea.&amp;nbsp; Final line count: 67.&amp;nbsp; Win :)&lt;/P&gt;</description><pubDate>Sat, 12 Sep 2009 01:18:00 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-5-and-updatepanel</guid><category>ADO.NET</category><category>ASP.NET</category><category>ASP.NET AJAX</category><category>ASP.NET AJAX Preview 5</category></item><item><title>Coding QA Podcast and ASP.NET AJAX</title><link>https://weblogs.asp.net:443/jimwang/coding-qa-podcast-and-asp-net-ajax</link><description>&lt;p&gt;The kind folks over at Coding QA Podcast (&lt;a href="http://www.codingqa.com"&gt;www.codingqa.com&lt;/a&gt;) did an interview with me yesterday, where I talk about some of the challenges with testing and building Microsoft AJAX and talk a little bit about myself.&amp;#160; There’s also a brief discussion of the &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28536"&gt;Lightweight Test Automation Framework&lt;/a&gt;, and the new IE8 Debugger.&amp;#160; I forget what the questions are every so often, but in my unbiased opinion it’s a pretty good listen ;).&amp;#160; &lt;a href="http://www.codingqa.com/index.php?post_id=496207"&gt;Click here&lt;/a&gt; to jump to the Coding QA Podcast site.&lt;/p&gt;</description><pubDate>Fri, 26 Jun 2009 17:14:44 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/coding-qa-podcast-and-asp-net-ajax</guid><category>ASP.NET</category><category>ASP.NET AJAX</category></item><item><title>ASP.NET AJAX Preview 4 Samples</title><link>https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-4-samples</link><description>&lt;p&gt;&lt;a href="http://politian.wordpress.com/"&gt;Politian&lt;/a&gt; has posted a lot of samples on using the new ADO.NET Data Services features in ASP.NET AJAX Preview 4 (in fact, at the time of this posting, the entire blog is dedicated to Preview 4!).&amp;#160; He walks through some basic scenarios, but then goes into detail about interesting sample topics as he builds his MIX Presenter Application.&amp;#160; Highlights thus far:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://politian.wordpress.com/2009/04/05/implementing-paging-in-the-adonet-data-services-application/"&gt;Implementing Paging&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://politian.wordpress.com/2009/04/05/adding-a-popup-details-view/"&gt;AJAX Control Toolkit Integration: Adding a Details View using ModalPopup&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://politian.wordpress.com/2009/04/05/implementing-updates/"&gt;Updates&lt;/a&gt;, &lt;a href="http://politian.wordpress.com/2009/04/05/implementing-inserts/"&gt;Inserts&lt;/a&gt;, &lt;a href="http://politian.wordpress.com/2009/04/05/implementing-delete/"&gt;Deletes&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Keep up the great work Politian!&amp;#160; Remember that you can get ASP.NET AJAX 4.0 Preview 4 on &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645"&gt;Codeplex&lt;/a&gt;.&lt;/p&gt;</description><pubDate>Mon, 06 Apr 2009 23:28:38 GMT</pubDate><guid isPermaLink="true">https://weblogs.asp.net:443/jimwang/asp-net-ajax-preview-4-samples</guid><category>ADO.NET</category><category>ASP.NET</category><category>ASP.NET AJAX</category><category>ASP.NET AJAX Preview 4</category></item></channel></rss>