<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Visoft, Inc. Blogs</title>
    <description>Microsoft .NET, ASP.NET, AJAX and more</description>
    <link>http://blogs.visoftinc.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 1.5.0.7</generator>
    <language>en-US</language>
    <blogChannel:blogRoll>http://blogs.visoftinc.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Visoft, Inc.</dc:creator>
    <dc:title>Visoft, Inc. Blogs</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/VisoftIncBlogs" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Book Review – Manning The Art of Unit Testing</title>
      <description>&lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/1933988274?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1933988274"&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 5px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="The Art of Unit Testing" border="0" alt="The Art of Unit Testing" align="right" src="http://blogs.visoftinc.com/image.axd?picture=The%20Art%20of%20Unit%20Testing.png" width="158" height="195" /&gt;&lt;/a&gt;To some, “unit testing” is a four letter word.&amp;#160; While it’s unfortunate, the feeling is justified by poor experiences, lack of knowledge, and so on.&amp;#160; Personally, I’ve had mixed experiences with unit tests.&amp;#160; I’m sure many of you have encountered similar situations.&amp;#160; After reading &lt;a href="http://www.amazon.com/gp/product/1933988274?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1933988274"&gt;The Art of Unit Testing&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1933988274" width="1" height="1" /&gt; by Roy Osherove, I feel far more confident in not only understanding unit tests, but also the best practices for implementation.&amp;#160; If this book had only been written years ago, maybe all those poor unit testing experiences would have never happened.&amp;#160; &lt;/p&gt;  &lt;p&gt;The fundamental thing that I think is most misunderstood about unit testing is simply not understanding what a unit test is.&amp;#160; In fact, Roy just recently posted an updated &lt;a href="http://weblogs.asp.net/rosherove/archive/2009/09/28/unit-test-definition-2-0.aspx" target="_blank"&gt;definition&lt;/a&gt; of how he would classify a unit test on &lt;a href="http://weblogs.asp.net/rosherove/default.aspx" target="_blank"&gt;his blog&lt;/a&gt;.&amp;#160; Of course a definition isn’t always enough, and in his book, Roy starts off by fully explaining all the aspects of what a unit test should be and the basic outline for how to succeed.&amp;#160; I would highly recommend that you visit his book’s webpage (&lt;a title="http://manning.com/osherove/" href="http://manning.com/osherove/"&gt;http://manning.com/osherove/&lt;/a&gt;) and download the sample &lt;a href="http://manning.com/osherove/SampleChapter1.pdf" target="_blank"&gt;first chapter&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;This seriously may be the best book ever written on unit testing.&amp;#160; I understand that “the best” is a strong statement, but this book is really the perfect package.&amp;#160; Let’s look at what makes this such a winner… &lt;/p&gt;  &lt;h2&gt;Come On, The “Best”&lt;/h2&gt;  &lt;p&gt;Of course, don’t just take my (or &lt;a href="http://www.amazon.com/review/RRUL62NZ3E0CA/ref=cm_cr_rdp_perm" target="_blank"&gt;BOO’s&lt;/a&gt;, or &lt;a href="http://devlicio.us/blogs/tim_barcz/archive/2009/07/23/book-review-the-art-of-unit-testing.aspx" target="_blank"&gt;Tim’s&lt;/a&gt;) word for it.&amp;#160; Obviously, check out other’s reviews on &lt;a href="http://www.amazon.com/gp/product/1933988274?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1933988274"&gt;Amazon&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=1933988274" width="1" height="1" /&gt; as well.&amp;#160; However, there are many points that justify my opinion:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;No Fluff&lt;/strong&gt; - It’s a slimmer book (320 pages), but packed with information.&amp;#160; The size of the book makes it very approachable, and it’s one of those books that you may want to read a few times to make sure everything really sinks in.&amp;#160; It’s a book you can recommend to just about everyone, regardless of their background.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;No Preaching&lt;/strong&gt; - One key thing that sets this book in a class by itself is the fact that it doesn’t focus on specific methodologies (like TDD), but is simply a guide to unit testing.&amp;#160; The book doesn’t assume anything or force any one way of practicing the art.&amp;#160; Fully devoted to TDD, great.&amp;#160; Could care less about TDD?&amp;#160; This book is for you as well.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Independent&lt;/strong&gt; – Despite the fact that Roy works for Typemock, the majority of examples found in the book use open-source “mocking” or isolation frameworks.&amp;#160; Throughout the book, no one tool is pushed over another.&amp;#160; Roy does a good job of going over the pros and cons of many different tools, from many vendors.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Inspiring&lt;/strong&gt; - From the initial chapter on, this book not only educates, but it truly inspires.&amp;#160; This is one of those books that gets you ramped up to do something.&amp;#160; Whether it is starting unit testing within your organization, or enhancing existing tests, you’ll want to start right away.&amp;#160; It’s that feeling we geeks get when a new version of software is released.&amp;#160; I know I’m not the only one who goes to software conferences and such, and feels like jumping head first into the latest and greatest.&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Chapters&lt;/h2&gt;  &lt;p&gt;This is one of the few books where each chapter matters.&amp;#160; Even the appendices are packed with important information.&amp;#160; You can see overviews of each chapter anywhere, so I won’t bore you with every little detail here.&amp;#160; But a few of the chapters really stood out.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Chapter 4, Interaction testing using mock objects&lt;/strong&gt; – We’ve all heard the terms “mocks” and “stubs,” but do you know the difference?&amp;#160; Many books refer to these, but the terminology can be confusing.&amp;#160; After Chapter 4, you’ll have a good grip on what’s what.&amp;#160; The explanations and best practices in this chapter, set the base line for the rest of the chapters.&amp;#160; It would be nice if everyone could use the “common” definitions of things, but unfortunately, this practice isn’t always followed when it comes to discussions of unit testing.&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Chapter 8, Integrating unit testing into the organization&lt;/strong&gt; - This topic in and of itself could be described as an “art.”&amp;#160; You may believe in something, but conveying the belief to others isn’t your typical walk in the park.&amp;#160; I was very impressed that this important issue was covered in the book.&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Chapter 9, Working with legacy code&lt;/strong&gt; – Of course we can’t always be working on brand new development. This chapter gives a good introduction and solid approaches for dealing with legacy code.&amp;#160; This is another one of those chapters that’s refreshing to see within a&amp;#160; book of this nature.&amp;#160; I like how the book branched out into topics that aren’t frequently discussed.&amp;#160; However, this topic is really one of those that could use an entire book written about it, and Roy recommends Michael Feathers, &lt;a href="http://www.amazon.com/gp/product/0131177052?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0131177052"&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0131177052" width="1" height="1" /&gt;. Gag, legacy code, right?&amp;#160; It’s a reality, and remember, that new shiny thing your working on will most likely end up as someone’s headache soon enough! &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;More From Roy&lt;/h2&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;After reading his book, I immediately started seeing what else Roy has been up to.&amp;#160; There are two great resources that Roy started, &lt;a href="http://5whys.com/" target="_blank"&gt;5whys.com&lt;/a&gt; and the &lt;a href="http://groups.google.com/group/leading-teams?pli=1" target="_blank"&gt;Team Leadership in Software&lt;/a&gt; group on Google.&amp;#160; Both will help you in working with and leading software teams.&amp;#160; On the unit testing/TDD front, be sure to check out &lt;a href="http://osherove.com/videos/" target="_blank"&gt;Roy’s videos&lt;/a&gt;.&amp;#160; You can also check out Roy’s other sites, &lt;a title="http://osherove.com/" href="http://osherove.com/" target="_blank"&gt;http://osherove.com/&lt;/a&gt;, &lt;a title="http://www.iserializable.com/" href="http://iserializable.com/" target="_blank"&gt;http://iserializable.com/&lt;/a&gt;, and &lt;a title="http://artofunittesting.com/" href="http://artofunittesting.com/" target="_blank"&gt;http://artofunittesting.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Jk0q3i9Xym7NGasDZNBrtA2WZuk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jk0q3i9Xym7NGasDZNBrtA2WZuk/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/Jk0q3i9Xym7NGasDZNBrtA2WZuk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jk0q3i9Xym7NGasDZNBrtA2WZuk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=GOqcIPxDads:svtLel3-eqo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=GOqcIPxDads:svtLel3-eqo:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=GOqcIPxDads:svtLel3-eqo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=GOqcIPxDads:svtLel3-eqo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=GOqcIPxDads:svtLel3-eqo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=GOqcIPxDads:svtLel3-eqo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=GOqcIPxDads:svtLel3-eqo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=GOqcIPxDads:svtLel3-eqo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/GOqcIPxDads" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/GOqcIPxDads/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/09/30/Book-Review-Manning-The-Art-of-Unit-Testing.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=875d7679-7c2f-4cdc-9917-e5376436397b</guid>
      <pubDate>Wed, 30 Sep 2009 15:57:11 -0500</pubDate>
      <category>Review</category>
      <category>C#</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=875d7679-7c2f-4cdc-9917-e5376436397b</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=875d7679-7c2f-4cdc-9917-e5376436397b</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/09/30/Book-Review-Manning-The-Art-of-Unit-Testing.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=875d7679-7c2f-4cdc-9917-e5376436397b</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=875d7679-7c2f-4cdc-9917-e5376436397b</feedburner:origLink></item>
    <item>
      <title>Silverlight 3 NavigationCacheMode To The Rescue</title>
      <description>&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; display: inline; border-top: 0px; border-right: 0px" title="Missing-Piece" border="0" alt="Missing-Piece" align="right" src="http://blogs.visoftinc.com/image.axd?picture=Missing-Piece.jpg" width="204" height="138" /&gt; I’ve been lucky enough to work on a new project for a client involving Silverlight 3 and the Silverlight Virtual Earth CTP.&amp;#160; One reoccurring issue that keeps coming up is performance, and I’m always looking for ways to balance functionality with speed.&amp;#160; In the app we are loading up a Virtual Earth map and populating it with data (nothing new).&amp;#160; We have a fair amount of data being loaded for various functions and layers.&amp;#160; Users are able to show and hide layers as well as interact with the map’s basic functions (zoom, pan, etc).&amp;#160; Users can then navigate to other areas based on selections from the map page.&amp;#160; &lt;/p&gt;  &lt;p&gt;Since we’re using SL3, we’re using the Navigation Framework to navigate between “pages.”&amp;#160; If you’re not familiar with the Navigation Framework, check out Martin Mihaylov’s &lt;a href="http://www.silverlightshow.net/items/The-Silverlight-3-Navigation-Framework.aspx" target="_blank"&gt;article&lt;/a&gt;, or if you prefer videos, be sure to check out Tim Heuer’s &lt;a href="http://silverlight.net/learn/learnvideo.aspx?video=187319" target="_blank"&gt;video on the topic&lt;/a&gt;.&amp;#160; Now let’s move on to the problem, and a solution… &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h2&gt;The Problem&lt;/h2&gt;  &lt;p&gt;This is actually a two pronged problem, with thankfully a single solution.&amp;#160; One thing we wanted was to have the Virtual Earth map (and the page) “remember” what you were doing.&amp;#160; So let’s say you had zoomed in and panned over to Connecticut, you then selected something from the map that redirected you to another Silverlight page.&amp;#160; Once you were done, you clicked on the navigation to go back to the map page.&amp;#160; There were two problems here.&amp;#160; The first was that navigation was slow.&amp;#160; The map has a lot of layers that are being bound with various pieces of data.&amp;#160; The map would rebind these layers since it was essentially a reload.&amp;#160; The second problem was that all the zooming and panning were totally lost, since the page reloaded the default view. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;As an aside, if you are interested in binding layers on the Virtual Earth map, look no further than Michael Scherotter’s awesome &lt;a href="http://code.msdn.microsoft.com/VESLBindingProps" target="_blank"&gt;Binding Properties for the Virtual Earth Silverlight Control&lt;/a&gt; project (there is also a &lt;a href="http://xmldocs.net/bestbuy/" target="_blank"&gt;demo of these in use&lt;/a&gt;).&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;So of course, these two issues really weren’t something that we wanted to put in front of a customer, so the hunt for a solution was on.    &lt;br /&gt;&lt;/p&gt;  &lt;h2&gt;The Solution&lt;/h2&gt;  &lt;p&gt;Thankfully within the Navigation Framework there is a fairly simple solution that solved both of these problems, however it’s not the most obvious if you aren’t sure what to search for.&amp;#160; After a lot of searching, I came across the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.page.navigationcachemode(VS.95).aspx" target="_blank"&gt;Page.NavigationCacheMode Property&lt;/a&gt; on MSDN.&amp;#160; This property has three settings: Disabled (the default), Enabled, or Required.&amp;#160; The usage is simple,&amp;#160; just append the property to your Page XAML like so:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;navigation:Page&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;x:Class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Samples.SampleApp&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;xmlns:x&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;xmlns:navigation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;Title&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Sample Page&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;strong&gt;&lt;span class="attr"&gt;NavigationCacheMode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Enabled&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Content --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;navigation:Page&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;That’s it.&amp;#160; &lt;/p&gt;

&lt;p&gt;The difference between Required and Enabled is that with Enabled, the cache could be flushed based on the CacheSize setting.&lt;/p&gt;

&lt;p&gt;In our app, we set the property to Required, which means the page will be cached regardless of the CacheSize property.&amp;#160; &lt;/p&gt;

&lt;p&gt;Hopefully, if you are looking for something along the lines of “reuse a page” or “don’t reload” associated with the Navigation Framework, you’ll come across this post. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MfsliO9emUq7pnQOZYB_Jr4tEos/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MfsliO9emUq7pnQOZYB_Jr4tEos/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/MfsliO9emUq7pnQOZYB_Jr4tEos/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MfsliO9emUq7pnQOZYB_Jr4tEos/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VY7C6Ya1n_E:WdQo-A_nTxs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VY7C6Ya1n_E:WdQo-A_nTxs:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VY7C6Ya1n_E:WdQo-A_nTxs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VY7C6Ya1n_E:WdQo-A_nTxs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VY7C6Ya1n_E:WdQo-A_nTxs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VY7C6Ya1n_E:WdQo-A_nTxs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VY7C6Ya1n_E:WdQo-A_nTxs:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VY7C6Ya1n_E:WdQo-A_nTxs:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/VY7C6Ya1n_E" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/VY7C6Ya1n_E/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/09/22/Silverlight-3-NavigationCacheMode-To-The-Rescue.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=cd265af3-cb61-40cd-80d5-605223e18040</guid>
      <pubDate>Tue, 22 Sep 2009 21:29:46 -0500</pubDate>
      <category>Silverlight</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=cd265af3-cb61-40cd-80d5-605223e18040</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=cd265af3-cb61-40cd-80d5-605223e18040</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/09/22/Silverlight-3-NavigationCacheMode-To-The-Rescue.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=cd265af3-cb61-40cd-80d5-605223e18040</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=cd265af3-cb61-40cd-80d5-605223e18040</feedburner:origLink></item>
    <item>
      <title>ASP.NET 4.0 AJAX Issues</title>
      <description>&lt;p&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=PuzzledMan.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 20px; display: inline; border-top: 0px; border-right: 0px" title="PuzzledMan" border="0" alt="PuzzledMan" align="right" src="http://blogs.visoftinc.com/image.axd?picture=PuzzledMan_thumb.png" width="150" height="200" /&gt;&lt;/a&gt; I’ve been using ASP.NET AJAX 4.0 quite a bit lately in ASP.NET 3.5 applications.&amp;#160; I encountered two issues tonight, and I hope this post saves someone some grief. &lt;/p&gt;  &lt;p&gt;The first problem has to do with referencing the ASP.NET AJAX 4.0 library within an ASP.NET 3.5 application, and the second was a surprising data binding issue using the &lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;DataView&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;If you are looking for more information on ASP.NET AJAX 4.0, be sure check out my &lt;a href="http://blogs.visoftinc.com/archive.aspx#AJAX"&gt;other articles&lt;/a&gt; on the site.&lt;/p&gt;  &lt;h2&gt;Issue 1 – The ScriptManagerProxy and CompositeScripts&lt;/h2&gt;  &lt;p&gt;The first issue I encountered was a client side error when using the DataView on a content page in my ASP.NET 3.5 SP1 application.&amp;#160; This site utilizes master pages, so I’m using a WebForm, otherwise I probably would have just gone with a plain old HTML page.&amp;#160; Regardless, since this is an ASP.NET application and the ScriptManager is declared in the Master page, I added the ASP.NET 4.0 AJAX scripts to a ScriptManagerProxy (instead of the &lt;a href="http://blogs.visoftinc.com/archive/2009/06/01/ASP.NET-AJAX-4.0-and-the-ScriptManager-Control.aspx"&gt;ScriptManager&lt;/a&gt; itself). The code for the ScriptManagerProxy looks very similar to that for the ScriptManger. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;asp:scriptmanagerproxy&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;smp&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MicrosoftAjax.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjax.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjaxTemplates.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjaxAdoNet.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;        &lt;br /&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;asp:scriptmanagerproxy&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt;I then proceeded to run the page, getting two errors, &lt;strong&gt;Type._registerScript is not a function &lt;/strong&gt;for both MicrosoftAjaxTemplates.js and MicrosoftAjaxAdoNet.js.&amp;#160; Seems like MicrosoftAjax.js isn’t being loaded.&amp;#160; When using ASP.NET AJAX 4.0, we need to ensure that it uses the 4.0 version of MicrosoftAjax.js.&amp;#160; Looking at FireBug’s Net tab, I confirmed that the 4.0 version of MicrosoftAjax.js wasn’t being loaded.&amp;#160; I didn’t understand why not, until I revisited the Master Page.&amp;#160; The ScriptManager code was using a CompositeScript, useful to save a bit of bandwidth, but that ended up causing the problem.&amp;#160; Here’s the offending code:&lt;/p&gt;

  &lt;div id="codeSnippetWrapper"&gt;
    &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;MasterScriptManager&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;compositescript&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;            &lt;strong&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;=&amp;quot;MicrosoftAjax.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/strong&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;=&amp;quot;MicrosoftAjaxWebForms.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            ... Additional script references ...&lt;br /&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;compositescript&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;/pre&gt;

    &lt;p&gt;By adding the 3.5 MicosoftAjax.js to the CompositeScript, it made it so the ScriptManagerProxy couldn’t load the correct version of that file.&amp;#160; I simply removed that ScriptReference from there and everything loaded correctly.&amp;#160; Of course this means that MicrosoftAjax.js isn’t being compiled into a nice composite script package, but if that’s what needs to be done to use the 4.0 scripts (at least for now), that’s fine.&lt;/p&gt;

    &lt;h2&gt;&lt;/h2&gt;

    &lt;h2&gt;Issue 2 – Incorrect Field Name&lt;/h2&gt;

    &lt;p&gt;I found this to be very odd behavior.&amp;#160; If you add &lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;binding syntax&lt;/a&gt; for something that doesn’t exist in the data context, the &lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;DataView&lt;/a&gt; control just flat out won’t render any data.&amp;#160; No error, just no content.&amp;#160; This seems silly.&amp;#160; I would expect the DataView to render the content it can, and use a null or empty string for things it can’t bind.&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;So let’s say you are using ADO.NET Data Services and the object coming back has a couple of fields like Name, Address1, and Address2.&amp;#160; Then you try to bind to &lt;font face="Courier New"&gt;{{ Address }}&lt;/font&gt;, which doesn’t exist in the object (whoops, forgot the “1” after that field), you end up looking at very empty HTML.&amp;#160; Nothing gets rendered.&amp;#160; Stupid mistake, yes (wouldn’t it be nice to have Intellisense when binding), but a very bizarre way of handling this sort of thing.&amp;#160; Lesson here, if you don’t see any content when the template loads, check the fields you are binding to.&lt;/p&gt;

&lt;p&gt;&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:0767317B-992E-4b12-91E0-4F059A8CECA8:ea4e2e8b-74df-4e31-a381-36ea5e7339c6" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET+AJAX+4.0" rel="tag"&gt;ASP.NET AJAX 4.0&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VSoGSkRdXX49UVZdYLHcUU_zKF4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VSoGSkRdXX49UVZdYLHcUU_zKF4/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/VSoGSkRdXX49UVZdYLHcUU_zKF4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VSoGSkRdXX49UVZdYLHcUU_zKF4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=5UnOf1Prge4:l_VNK9A1d7o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=5UnOf1Prge4:l_VNK9A1d7o:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=5UnOf1Prge4:l_VNK9A1d7o:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=5UnOf1Prge4:l_VNK9A1d7o:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=5UnOf1Prge4:l_VNK9A1d7o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=5UnOf1Prge4:l_VNK9A1d7o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=5UnOf1Prge4:l_VNK9A1d7o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=5UnOf1Prge4:l_VNK9A1d7o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/5UnOf1Prge4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/5UnOf1Prge4/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/08/27/ASP.NET-4.0-AJAX-Issues.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=2e2dc69a-2fcd-469f-a599-fe675ee8bd91</guid>
      <pubDate>Thu, 27 Aug 2009 20:14:58 -0500</pubDate>
      <category>AJAX</category>
      <category>ASP.NET</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=2e2dc69a-2fcd-469f-a599-fe675ee8bd91</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=2e2dc69a-2fcd-469f-a599-fe675ee8bd91</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/08/27/ASP.NET-4.0-AJAX-Issues.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=2e2dc69a-2fcd-469f-a599-fe675ee8bd91</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=2e2dc69a-2fcd-469f-a599-fe675ee8bd91</feedburner:origLink></item>
    <item>
      <title>ASP.NET AJAX 4.0 and the ScriptManager Control</title>
      <description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 15px 15px; display: inline; border-top: 0px; border-right: 0px" title="Puzzle Pieces" border="0" alt="Puzzle Pieces" align="right" src="http://blogs.visoftinc.com/image.axd?picture=PuzzlePieces_1.jpg" width="136" height="200" /&gt; I have been using ASP.NET AJAX 4.0 quite a bit lately, as I’m sure most of you are aware from my recent posts.&amp;#160; In those posts, I used standard HTML script references to show that ASP.NET AJAX is not reliant upon ASP.NET.&amp;#160; I realize that many of you are in fact using ASP.NET, and today we will take a look at using the ScriptManager.&amp;#160; &lt;/p&gt;  &lt;p&gt;First we’ll look at using the Preview 4 scripts within an ASP.NET 3.5 application (with the ScriptManager of course) as well as using client templates and ADO.NET Data Services with the ScriptManager in ASP.NET 4.0 (Beta 1).&amp;#160; After that, we’ll take a closer look at some of the new features of the ScriptManager in ASP.NET 4.0.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Preview 4 and the ASP.NET 3.5 ScriptManager&lt;/h2&gt;  &lt;p&gt;In my posts on ASP.NET AJAX 4.0 so far, I used standard HTML script references (as stated earlier).&amp;#160; However, what if you wanted to incorporate the new ASP.NET AJAX 4.0 scripts with a ScriptManager.&amp;#160; I tried this in a recent ASP.NET 3.5 SP1 project, and ran into some issues getting it all to work out.&amp;#160; Thanks to &lt;a href="http://weblogs.asp.net/wallym/archive/2009/03/17/asp-net-4-0-ajax-preview-release-4-setup.aspx" target="_blank"&gt;this blog&lt;/a&gt; (and &lt;a href="http://weblogs.asp.net/bleroy/" target="_blank"&gt;Bertrand LeRoy&lt;/a&gt;), I found the solution.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;sm&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;MicrosoftAjax.js&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjax.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjaxAdoNet.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;scriptmode&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Inherit&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;~/scripts/MicrosoftAjaxTemplates.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;                &lt;br /&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;br /&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;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Client Templates and ASP.NET 4.0 ScriptManager&lt;/h2&gt;

&lt;p&gt;If you are using Visual Studio 2010 (currently in Beta 1) and you want to use client templates (e.g. DataView) or ADO.NET Data Services, you may think you can just add a ScriptManager to the page (at least I initially did) and everything will work.&amp;#160; This isn’t the case.&amp;#160; These are new features of ASP.NET AJAX , so you need to add them as ScriptReferences.&amp;#160; I’m not sure if this will change for the release, but in an effort to keep the size down, I’m thinking this may be the way it stays.&amp;#160; Not that big of a deal, just something to be aware of.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;sm&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&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;=&amp;quot;MicrosoftAjaxTemplates.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;=&amp;quot;MicrosoftAjaxAdoNet.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;br /&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;/pre&gt;
&lt;/div&gt;

&lt;h2&gt;ASP.NET 4.0 ScriptManager - Activating Elements Declaratively &lt;/h2&gt;

&lt;p&gt;In my previous posts, you’ve seen both declarative and imperative examples using ASP.NET AJAX components and controls.&amp;#160; To refresh your memory, let’s look at the “&lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;Simplest Live Binding Example&lt;/a&gt;” from my &lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;data binding post&lt;/a&gt;.&amp;#160; This snippet uses live binding and client templates (the DataView).&amp;#160; If you need a refresher on the basics of the DataView and using it declaratively, be sure to check out my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;client template post&lt;/a&gt;.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;xmlns:dataview&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;javascript:Sys.UI.DataView&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;sys:activate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&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;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;        &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding name}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;One of the keys to getting this to work is to have it activate and bind when the page loads.&amp;#160; In the declarative syntax, this is achieved through the sys:activate attribute found on the body tag.&amp;#160; In some instances, such as working with a content page, you may not have access to the body tag.&amp;#160; In this case the new &lt;strong&gt;&lt;em&gt;ClientElementsToActivate&lt;/em&gt;&lt;/strong&gt; property of the ScriptManager and ScriptManagerProxy controls, helps to alleviate this problem.&amp;#160; The &lt;strong&gt;&lt;em&gt;ClientElementsToActivate&lt;/em&gt;&lt;/strong&gt; property accepts a comma-delimited list of elements to activate, just like the sys:activate attribute does.&amp;#160; Taking the previous snippet as an example, we can see how using this new property can be used with the ScriptManager (note I have included the ScriptReference since this sample requires the DataView, not because it is needed to use the ClientElementsToActivate property).&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div id="codeSnippetWrapper"&gt;
    &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;sm&amp;quot;&lt;/span&gt;  &lt;span class="attr"&gt;runat&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;br /&gt;      &lt;span class="attr"&gt;ClientElementsToActivate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&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;=&amp;quot;MicrosoftAjaxTemplates.js&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&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;br /&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;br /&gt; &lt;br /&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;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    ...&lt;br /&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;br /&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;ASP.NET 4.0 ScriptManager – ASP.NET AJAX Enhancements&lt;/h2&gt;

&lt;p&gt;A new feature of the ScriptManager in ASP.NET 4.0 is the ability to use only parts of the ASP.NET AJAX Library.&amp;#160; In addition, you can also use the ScriptManager without using &lt;strong&gt;any&lt;/strong&gt; of the ASP.NET AJAX framework.&amp;#160; You can now get the benefits from ScriptManager such as support for debug / release modes, localization, script combining, etc, without having to have ASP.NET AJAX scripts rendered by default (as it is now in 3.5).&lt;/p&gt;

&lt;p&gt;In ASP.NET 4.0, the default behavior is the same as the current behavior in ASP.NET 3.5, meaning the complete ASP.NET AJAX library is included by default.&amp;#160; Remember from earlier that this does not include MicrosoftAjaxTemplates.js or MicrosoftAjaxAdoNet.js (at least in Beta 1).&amp;#160; &lt;/p&gt;

&lt;p&gt;The ScriptManager control has a new property, &lt;strong&gt;&lt;em&gt;MicrosoftAjaxMode&lt;/em&gt;&lt;/strong&gt;, which allows you to override the default behavior.&amp;#160; The settings available for the &lt;strong&gt;&lt;em&gt;MicrosoftAjaxMode&lt;/em&gt;&lt;/strong&gt; are:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Enabled&lt;/strong&gt; – The default value, all Microsoft AJAX script are included.&amp;#160; This is the same as the current behavior (e.g. ASP.NET 3.5). &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Explicit&lt;/strong&gt; – This allows you to pick and choose what scripts are referenced.&amp;#160; You need to make sure that you include all scripts that have dependencies on one another. &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Disabled&lt;/strong&gt; – All the the Microsoft ASP.NET AJAX scripts are disabled and no scripts are referenced automatically. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you use Explicit mode, the following Microsoft AJAX scripts are available for reference:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;MicrosoftAjaxCore.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxComponentModel.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxSerialization.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxGlobalization.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxHistory.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxNetwork.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxWebServices.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxApplicationServices.js &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxTemplates.js (New for ASP.NET AJAX 4.0) &lt;/li&gt;

  &lt;li&gt;MicrosoftAjaxAdoNet.js (New for ASP.NET AJAX 4.0) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information on the new functionality as well as the dependencies for the Microsoft AJAX Library scripts, refer to the &lt;a href="http://www.asp.net/learn/whitepapers/aspnet40/#_Refactoring_the_Microsoft" target="_blank"&gt;ASP.NET 4.0 and Visual Studio 2010 Web Development Overview&lt;/a&gt; whitepaper.&lt;/p&gt;

&lt;h2&gt;More ASP.NET AJAX 4.0 Reading&lt;/h2&gt;

&lt;p&gt;If you are interested in ASP.NET AJAX 4.0, and have missed my past posts, be sure to check out:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;ASP.NET 4.0 AJAX – Preview 4 – Client Templates&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx"&gt;ASP.NET 4.0 AJAX – Preview 4 – JavaScript Observer Pattern&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx"&gt;ASP.NET 4.0 AJAX – Preview 4 – Data Binding&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d8b75fc6-8b29-4f1e-9bde-5512316506e4" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ScriptManager" rel="tag"&gt;ScriptManager&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX" rel="tag"&gt;AJAX&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ARoos_8pTaIVRmP0wxVu_rN6OlM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ARoos_8pTaIVRmP0wxVu_rN6OlM/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/ARoos_8pTaIVRmP0wxVu_rN6OlM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ARoos_8pTaIVRmP0wxVu_rN6OlM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=SMFiiFCfTPo:AF1p3ydbcB0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=SMFiiFCfTPo:AF1p3ydbcB0:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=SMFiiFCfTPo:AF1p3ydbcB0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=SMFiiFCfTPo:AF1p3ydbcB0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=SMFiiFCfTPo:AF1p3ydbcB0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=SMFiiFCfTPo:AF1p3ydbcB0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=SMFiiFCfTPo:AF1p3ydbcB0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=SMFiiFCfTPo:AF1p3ydbcB0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/SMFiiFCfTPo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/SMFiiFCfTPo/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/06/01/ASP.NET-AJAX-4.0-and-the-ScriptManager-Control.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=f1eb040a-a856-4d10-af1e-0bfb21af5c67</guid>
      <pubDate>Mon, 01 Jun 2009 19:15:48 -0500</pubDate>
      <category>ADO.NET Data Services</category>
      <category>ASP.NET</category>
      <category>AJAX</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=f1eb040a-a856-4d10-af1e-0bfb21af5c67</pingback:target>
      <slash:comments>12</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=f1eb040a-a856-4d10-af1e-0bfb21af5c67</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/06/01/ASP.NET-AJAX-4.0-and-the-ScriptManager-Control.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=f1eb040a-a856-4d10-af1e-0bfb21af5c67</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=f1eb040a-a856-4d10-af1e-0bfb21af5c67</feedburner:origLink></item>
    <item>
      <title>ASP.NET 4.0 AJAX – Preview 4 – Data Binding</title>
      <description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 15px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Laptop" border="0" alt="Laptop" align="left" src="http://blogs.visoftinc.com/image.axd?picture=Laptop.jpg" width="204" height="175" /&gt;Throughout the course of my introductory posts on ASP.NET AJAX 4.0, we looked at the new &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;DataView control&lt;/a&gt; as well as the &lt;a href="http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx"&gt;Sys.Observer class&lt;/a&gt;, which brings the Observer pattern to plain JavaScript objects.&amp;#160; The new ASP.NET AJAX release is very exciting offering powerful new features to take AJAX enabled applications to a new level.&amp;#160; In this post, we’ll look at another exciting feature of ASP.NET AJAX 4.0 known as “live bindings.”&amp;#160; &lt;/p&gt;  &lt;p&gt;You may remember that we looked briefly at live bindings in the &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;client templates&lt;/a&gt; post, but for those examples I used one-way / one-time bindings.&amp;#160; Today, we’ll take a closer look at live bindings and see how two-way live bindings removes the one-way / one-time binding restriction allowing us to update bound elements on our page automatically when the underlying data changes.&amp;#160; &lt;/p&gt;  &lt;p&gt;Again, in this post, I’ll be using Preview 4 of the ASP.NET AJAX Library, which can be downloaded from &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645" target="_blank"&gt;CodePlex&lt;/a&gt;.&amp;#160; The Preview 4 version can be used in your applications today (e.g. ASP 3.5, HTML).&amp;#160; Keep in mind that these components are still in &amp;quot;preview&amp;quot; mode (meaning no Microsoft support), though they are usable at your own risk.&amp;#160; For more information, you can check out the &lt;a href="http://aspnet.codeplex.com/license" target="_blank"&gt;license&lt;/a&gt; on CodePlex. &lt;/p&gt;  &lt;h2&gt;Source Code&lt;/h2&gt;  &lt;p&gt;You can download and run all of the sample code that you find in this post.&amp;#160; The source code contains a Web Site project and uses .NET 3.5 SP1 for the server-side components (e.g. Entity Framework, ADO.NET Data Services) and SQL Server Express 2008.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.visoftinc.com/file.axd?file=DataBindingSamples.zip"&gt;&lt;img style="border-right-width: 0px; margin: 0px auto 5px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Download the Source Code - DataBindingSamples.zip " border="0" alt="Download the Source Code - DataBindingSamples.zip " src="http://blogs.visoftinc.com/image.axd?picture=databindingsamplesDownload.gif" width="404" height="68" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;The Simplest Live Binding Example&lt;/h2&gt;  &lt;p&gt;Let’s start with a very simple example of live binding in action.&amp;#160; In the first snippet, we’ll look at binding a very simple client template (the Sys.UI.DataView) using the declarative creation and binding syntax.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;xmlns:dataview&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;javascript:Sys.UI.DataView&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;sys:activate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&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;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;        &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding name}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 10px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Simple Live Binding" border="0" alt="Simple Live Binding" align="right" src="http://blogs.visoftinc.com/image.axd?picture=Simple%20Live%20Binding.gif" width="216" height="92" /&gt;If you read my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;client template post&lt;/a&gt;, most of this code should look familiar.&amp;#160; There are a couple of new things in this snippet however.&amp;#160; First, you probably noticed the {binding name}.&amp;#160; This is the live binding syntax.&amp;#160; We’ll look closer at this a bit later, but if you’ve used WPF or Silverlight the syntax should look familiar.&amp;#160; The one other thing that I’ve added to make this work is the dataview:data attribute.&amp;#160; The {{ }} syntax in this attribute simply defines an inline expression, and inside of that, I’ve created an inline JavaScript object, which contains one property ‘name’ and the value is just an empty string (I could have just as easily used null).&amp;#160; The reasoning behind this is that the DataView needs to initially bind data to something, so based on our binding expressions, both the input and span will be initially filled with the empty “name” property.&lt;/p&gt;

&lt;p&gt;When you load this page, and enter your name in the textbox, the span will be updated with what you entered in the textbox after you tab away from it.&amp;#160; You can see this in action in the clip playing off to the right.&lt;/p&gt;

&lt;h2&gt;Using Sys.Binding Imperatively&lt;/h2&gt;

&lt;p&gt;In the last example, we used a DataView along with the binding markup.&amp;#160; The binding markup {binding propertyName} and {{ propertyName }} can only be used inside client templates (the DataView).&amp;#160; What if you didn’t want to use a DataView for something like that last example?&amp;#160; Well it’s possible, thanks to the way that binding is handled in ASP.NET AJAX.&amp;#160; The binding markup maps back to the component Sys.Binding, which in turn uses &lt;a href="http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx"&gt;Sys.Observer&lt;/a&gt;.&amp;#160; We can harness the power of Sys.Binding directly if needed.&amp;#160; Let’s see how we would accomplish the same example as before, but this time using Sys.Binding directly.&amp;#160; We can do this declaratively (like the DataView example from above) or imperatively using JavaScript.&amp;#160; First, we’ll look at the imperative code:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;&amp;lt;!-- Script references removed for brevity --&amp;gt;&lt;/span&gt;   &lt;br /&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;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;pre class="alt"&gt;&lt;span id="lnum1" class="lnum"&gt;   1:&lt;/span&gt;&amp;#160; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span id="lnum2" class="lnum"&gt;   2:&lt;/span&gt;         Sys.Application.add_init(&lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span id="lnum3" class="lnum"&gt;   3:&lt;/span&gt;             $create(Sys.Binding,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span id="lnum4" class="lnum"&gt;   4:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span id="lnum5" class="lnum"&gt;   5:&lt;/span&gt;                 source: $get(&lt;span class="str"&gt;'name'&lt;/span&gt;),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span id="lnum6" class="lnum"&gt;   6:&lt;/span&gt;                 path: &lt;span class="str"&gt;&amp;quot;value&amp;quot;&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span id="lnum7" class="lnum"&gt;   7:&lt;/span&gt;                 target: $get(&lt;span class="str"&gt;'nameDisplay'&lt;/span&gt;),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span id="lnum8" class="lnum"&gt;   8:&lt;/span&gt;                 targetProperty: &lt;span class="str"&gt;&amp;quot;innerHTML&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span id="lnum9" class="lnum"&gt;   9:&lt;/span&gt;             });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span id="lnum10" class="lnum"&gt;  10:&lt;/span&gt;         });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span id="lnum11" class="lnum"&gt;  11:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;head&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&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;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;html&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;You’ll notice there isn’t much going on in the HTML this time since this isn’t declaratively bound.&amp;#160;&amp;#160; &lt;/p&gt;

&lt;p&gt;Looking at the JavaScript block, I’m using the $create shortcut in order to wire up the Sys.Binding component.&amp;#160; Since this is a component and not a control like the DataView, the only parameters that need to be passed to $create is the type (Sys.Binding) and properties for the Sys.Binding component (a JavaScript object).&amp;#160; The $create call is simply creating an association between the textbox (input) and the span.&amp;#160; Again, the results of this code are exactly the same as the initial example that we looked at.&lt;/p&gt;

&lt;p&gt;Let’s take a closer look at the properties being set in the last example:&lt;/p&gt;

&lt;table border="1" cellspacing="0" cellpadding="2" width="398"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td valign="top" width="112"&gt;&lt;strong&gt;source&lt;/strong&gt;&lt;/td&gt;

      &lt;td valign="top" width="284"&gt;The source object (the textbox in our case). 
        &lt;br /&gt;

        &lt;br /&gt;Note: This is using $get in order to access the element by its Id.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="114"&gt;&lt;strong&gt;path&lt;/strong&gt;&lt;/td&gt;

      &lt;td valign="top" width="282"&gt;The property name or path to the source property.&amp;#160; This is the property value that will be sent to the target (the value property of the textbox in our case). 
        &lt;br /&gt;

        &lt;br /&gt;I would have expected this to be called sourceProperty since there is a targetProperty, but this follows the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.data.binding.path(VS.85).aspx" target="_blank"&gt;WPF convention&lt;/a&gt;.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="114"&gt;&lt;strong&gt;target&lt;/strong&gt;&lt;/td&gt;

      &lt;td valign="top" width="282"&gt;The target that will be updated based on the source (the span in our case). 
        &lt;br /&gt;

        &lt;br /&gt;Again, notice the $get.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="114"&gt;&lt;strong&gt;targetProperty&lt;/strong&gt;&lt;/td&gt;

      &lt;td valign="top" width="282"&gt;The property name or path for the target.&amp;#160; In short, what you want to set (innerHTML in our case). 
        &lt;br /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;You can find a full list of the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409292(VS.100).aspx" target="_blank"&gt;properties for Sys.Binding&lt;/a&gt; on MSDN.&amp;#160; &lt;/p&gt;

&lt;h2&gt;Using Sys.Binding Declaratively&lt;/h2&gt;

&lt;p&gt;You just saw the imperative creation of Sys.Binding, but if you’d rather declarative syntax, then this is the example for you.&amp;#160; I’m working off the same example so that you can easily see the similarities and differences between the snippets.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;xmlns:binding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;javascript:Sys.Binding&amp;quot;&lt;/span&gt;&lt;br /&gt;      &lt;span class="attr"&gt;sys:activate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;=&amp;quot;simpleForm&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        Name: &lt;br /&gt;        &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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;br /&gt;            &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;binding&amp;quot;&lt;/span&gt;&lt;br /&gt;            &lt;span class="attr"&gt;binding:source&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ $get('name') }}&amp;quot;&lt;/span&gt;&lt;br /&gt;            &lt;span class="attr"&gt;binding:path&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;value&amp;quot;&lt;/span&gt;&lt;br /&gt;            &lt;span class="attr"&gt;binding:target&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ $get('nameDisplay') }}&amp;quot;&lt;/span&gt;&lt;br /&gt;            &lt;span class="attr"&gt;binding:targetProperty&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;innerHTML&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;br /&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;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Comparing this code to that of the imperative version, it should be pretty easy to pick out the similarities.&amp;#160; Instead of defining the properties for the Sys.Binding component in code, they are now added as attributes to the textbox.&amp;#160; Also, the sys:attach coupled with the xmlns:binding=”javascript:Sys.Binding” replaces the first parameter in the $create call from the imperative example.&amp;#160; Other than that, there shouldn’t be anything here that looks strange, if it does, refer back to my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;client template post&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Live Binding Syntax&lt;/h2&gt;

&lt;p&gt;Now that you’ve seen an example of live binding in action, let’s take a minute and look at the options available to us with live binding.&lt;/p&gt;

&lt;p&gt;The first is the binding type &lt;a href="http://msdn.microsoft.com/en-us/library/dd448879(VS.100).aspx#data_binding" target="_blank"&gt;defined in MSDN&lt;/a&gt; as an “inline expression evaluation.”&amp;#160; This is commonly referred to as one-way/one-time when talking about binding, but the double curly braces syntax is also used to evaluate expressions (for example the attribute &lt;span class="attr"&gt;binding:source=”{{ $get(‘name’) }}” from the last example).&amp;#160; When it used as a binding type, such as &amp;lt;span&amp;gt;{{ name }}&amp;lt;/span&amp;gt;, this simply means that expression is only handled when the template is bound/re-bound. &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Next up is one-way and two-way binding.&amp;#160; The syntax for these bindings is {binding propertyName}, as you’ve seen before.&amp;#160; The syntax is the same since the determination of using one-way or two-way is based on the element itself.&amp;#160; One-way binding is the default mode of binding for HTML properties and context.&amp;#160; For input controls however, two-way binding is the default.&amp;#160; You can see this in action in the first example we looked at, binding within the DataView.&amp;#160; As a refresher, here is the pertinent snippet again:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding name}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;If the default behavior isn’t desired, for example if you only wanted one-way binding on a textbox, you can specify the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409321(VS.100).aspx" target="_blank"&gt;mode&lt;/a&gt; of the binding.&amp;#160; This can be done within the inline markup as so:&lt;/p&gt;

&lt;div&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=oneWay}&amp;quot;&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding name}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;We’ll look a bit closer at binding modes in the next section, but one thing to take away from the syntax here is that you can specify properties for Sys.Binding within the HTML markup.&amp;#160; Another common property that you may set would be the source. For example, in a master-detail type setup where you have a master DataView and a detail DataView, you may have something along the lines of:&lt;/div&gt;

&lt;div&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;detailView&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding selectedData, source={{master}} }&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;You see that syntax a bit later in the Master/Detail example.&amp;#160; In addition to mode and source, another property that you’ll often see is the convert and convertBack properties.&amp;#160; These allow you to call functions when either updating the target (convert) or updating the source (convertBack).&amp;#160; For example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Inches: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&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;=&amp;quot;inches&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding num, convert=toInches, convertBack=toFeet }&amp;quot;&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;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Feet: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;feet&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding num }&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In this snippet the Inches textbox will call toFeet when updating the Feet textbox.&amp;#160; When the Feet textbox is updated and the binding happens on the Inches textbox, it will first be converted to inches using the toInches method. &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Binding Modes&lt;/h2&gt;

&lt;div&gt;In the last section we looked at the syntax for live binding, and I introduced the mode functionality.&amp;#160; The binding modes come from the “enumerator” Sys.BindingMode and contains five options (similar to those in WPF).&amp;#160; Let’s take a closer look at each one of them within the context of the HTML markup expressions.&amp;#160; Remember these are simply just properties for the Sys.Binding class, so these are the enumerations you can use if you set the mode property via JavaScript instead of doing it in the markup.&amp;#160; &lt;/div&gt;

&lt;h3&gt;Sys.BindingMode.auto&lt;/h3&gt;

&lt;p&gt;This is the default binding mode that you’ve seen already.&amp;#160; Two-way binding on an input control, and one-way binding on a context-type elements such as spans.&amp;#160; If for some reason you want to manually set the mode to auto, you can do this as well, but it’s not required.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;defaultBinding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;name&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=auto}&amp;quot;&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Echo: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nameDisplay&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding name, mode=auto}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;span&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;/div&gt;

&lt;h3&gt;Sys.BindingMode.twoWay&lt;/h3&gt;

&lt;p&gt;This is the default binding mode for input controls.&amp;#160; In this snippet, I’ve explicitly set both inputs to twoWay, although I could have left the mode specification off since it is the default.&amp;#160; In this snippet, when you update either textbox, the other one will be updated with the same value.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;twoWayBinding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;name1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=twoWay}&amp;quot;&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Echo: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;nameDisplay1&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=twoWay}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;/div&gt;

&lt;h3&gt;Sys.BindingMode.oneWay&lt;/h3&gt;

&lt;p&gt;Again, this is the default binding mode for properties and context-type HTML elements (e.g. span, div, etc).&amp;#160; You can specify this mode on an input control in order to override the default two-way binding.&amp;#160; In this snippet, when you update the Name textbox it will be displayed in the Echo textbox, but changing Echo won’t update Name since the Echo textbox is oneWay.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;oneWayBinding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;name2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Echo: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;nameDisplay2&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=oneWay}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;/div&gt;

&lt;h3&gt;Sys.BindingMode.oneWayToSource&lt;/h3&gt;

&lt;p&gt;This binding works opposite to the last oneWay binding example.&amp;#160; In this case, changes to the Echo textbox will update the Name textbox, but updating Name won’t change Echo.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;oneWayToSourceBinding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;name3&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Echo: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;nameDisplay3&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=oneWayToSource}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;/div&gt;

&lt;h3&gt;Sys.BindingMode.oneTime&lt;/h3&gt;

&lt;p&gt;In oneTime mode, the element will only be updated when the template is first instantiated.&amp;#160; For this snippet, the Name and Echo textboxes will be updated with my name and will be bound to both textboxes since it is defined in the object literal being passed to the DataView.&amp;#160; Changing the Name textbox in this case won’t update the Echo box.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;oneTimeBinding&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ { name:'Damien' } }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;name4&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name}&amp;quot;&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;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Echo: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;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;=&amp;quot;nameDisplay4&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding name, mode=oneTime}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&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;br /&gt;&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;The “Classic” Example: Master/Detail&lt;/h2&gt;

&lt;p&gt;Typically when looking up live binding, you’ll come across some kind of master/detail sample.&amp;#160; To keep with the “tradition” we’ll work through an example using SQL 2008, the Entity Framework, and ADO.NET Data Services server-side, and the ASP.NET AJAX DataView client-side.&amp;#160; Again, keeping with the trend of seeing how ASP.NET AJAX can be used outside of ASP.NET, the hosting page will simply be a standard HTML page.&amp;#160; In this sample we will be keeping a list of blogs that we enjoy.&amp;#160; We’ll add the blogs to the page one at a time, and we will persist the changes back to the database all at once thanks to ADO.NET Data Services.&lt;/p&gt;

&lt;h3&gt;Server-Side Code&lt;/h3&gt;

&lt;p&gt;First, we’ll start with a simple SQL 2008 Express Database that contains a single table named “blog.”&amp;#160; The schema is shown in Figure 1.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 5px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 1 - The Blog Table" border="0" alt="Figure 1 - The Blog Table" src="http://blogs.visoftinc.com/image.axd?picture=Figure%201%20-%20The%20Blog%20Table.png" width="281" height="152" /&gt;&amp;#160;&amp;#160; &lt;br /&gt;&lt;strong&gt;Figure 1 – The Database Schema&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Next up is the Entity Framework.&amp;#160; Simply add an ADO.NET Entity Data Model to the project.&amp;#160; I’ll name this BlogModel.edmx.&amp;#160; I’ll then use the “Generate from Database” option when prompted.&amp;#160; I’ve accepted the defaults for everything else.&amp;#160; We now have a single entity based on the blog table.&amp;#160; I’ve changed the EntitySet name to Blogs in order to make our service clearer when calling it, for example to get an item with an ID of 1, /BlogService.svc/&lt;strong&gt;Blogs&lt;/strong&gt;(1) instead of /BlogService.svc/&lt;strong&gt;Blog&lt;/strong&gt;(1) if I had left the default EntitySet name.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 2 - The Blog Entity" border="0" alt="Figure 2 - The Blog Entity" src="http://blogs.visoftinc.com/image.axd?picture=Figure%202%20-%20The%20Blog%20Entity.png" width="171" height="168" /&gt; 

  &lt;br /&gt;&lt;strong&gt;Figure 2 – The Blog Entity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that the database and the entity model are in place, the next step is to expose the entities via ADO.NET Data Services.&amp;#160; To do this, simply add an “ADO.NET Data Service.”&amp;#160;&amp;#160; I’ve named my service “BlogService.svc.”&amp;#160; Then we need to configure the service, which involves specifying our entities to expose and configuring the rules for our service.&amp;#160; Since this is just a test service, I’ve opened all operations to all entities.&amp;#160; In addition I’ve configured the service to use verbose errors, and to include the exception details in an error.&amp;#160; &lt;strong&gt;&lt;em&gt;In a production application, these settings should not be used, as we’re exposing everything to everyone.&lt;/em&gt;&lt;/strong&gt;&amp;#160; &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;[ServiceBehavior(IncludeExceptionDetailInFaults=&lt;span class="kwrd"&gt;true&lt;/span&gt;)]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; BlogService : DataService&amp;lt;BlogsModel.BlogsEntities&amp;gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; InitializeService(IDataServiceConfiguration config)&lt;br /&gt;    {&lt;br /&gt;        config.UseVerboseErrors = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;br /&gt;        config.SetEntitySetAccessRule(&lt;span class="str"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;, EntitySetRights.All);&lt;br /&gt;        config.SetServiceOperationAccessRule(&lt;span class="str"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;, ServiceOperationRights.All);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Now that the server side is configured, let’s test it out in the browser.&amp;#160; One thing you need to do before testing an ADO.NET Data Service is to make sure the “Feed View” is turned off in your browser.&amp;#160; For the XML representation of the data, ADO.NET Data Services uses ATOM, which RSS feeds use as well.&amp;#160; The browser, being helpful, will use the “Feed View” trying to “pretty” up the display of your service, when in fact we won’t see the raw XML data.&amp;#160; To turn off Feed View in Internet Explorer, simply go to Tools &amp;gt;&amp;gt; Internet Options &amp;gt;&amp;gt; Content Tab &amp;gt;&amp;gt; Feed Settings &amp;gt;&amp;gt; Uncheck “Turn on feed reading view.”&amp;#160; Now we can start browsing our service.&lt;/p&gt;

&lt;p&gt;Calling the BlogService.svc directly, this will show us the collections available for us to use.&amp;#160; Simply browse to “/BlogService.svc” in the root of the application.&amp;#160; Next, let’s test the Blogs collection by browsing to “BlogService.svc/Blogs” and finally use “BlogService.svc/Blogs(1)” to access the entry with an ID of 1.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 3 - Testing the Data Service" border="0" alt="Figure 3 - Testing the Data Service" src="http://blogs.visoftinc.com/image.axd?picture=Figure%203%20-%20Testing%20the%20Data%20Service.png" width="657" height="425" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 3 - Testing the ADO.NET Data Service&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Client-Side Code&lt;/h3&gt;

&lt;p&gt;Now that the server work is done, let’s move on to the client code.&amp;#160; The user interface will allow us to perform the standard CRUD (Create, Read, Update, Delete) operations using ADO.NET Data Services.&amp;#160; We will list the blogs that are found in the database and add a snapshot of the site using a cool service I discovered called &lt;a href="http://www.bitpixels.com/" target="_blank"&gt;BitPixels.com&lt;/a&gt;.&amp;#160; This site serves thumbnails of web pages without requiring a registration, which is perfect for a demo since you can download my sample code and run this on your machine without having to worry about registering to get it to work.&lt;/p&gt;

&lt;p&gt;Here’s an example of it fully working:&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=MasterDetail_1.gif"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Master Detail Example" border="0" alt="Master Detail Example" src="http://blogs.visoftinc.com/image.axd?picture=MasterDetail_thumb.gif" width="484" height="248" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;An important thing to note on the example, changes aren’t persisted until they are saved back to the server.&amp;#160; We’ll see how this is accomplished when we look at the JavaScript code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first difference with this example from the others that you have seen in my previous posts (&lt;a href="http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx"&gt;Sys.Observer&lt;/a&gt; and &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;Client Templates&lt;/a&gt;) is the JavaScript files being referenced.&amp;#160; We’re still using MicrosoftAjax.js and MicrosoftAjaxTemplates.js, but in addition we need to reference MicrosoftAjaxAdoNet.js.&amp;#160; This library allows us to work very easily with ADO.NET Data Services.&amp;#160; The script references should look like the following:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;scripts/MicrosoftAjax.debug.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;scripts/MicrosoftAjaxTemplates.debug.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&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;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;scripts/MicrosoftAjaxAdoNet.debug.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Now, onto the HTML markup.&amp;#160; There is a fair amount going on here, but some of it should look familiar to you.&amp;#160; I’ve added line numbers to this snippet in order to easily refer to the code.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div id="codeSnippet" class="csharpcode"&gt;
    &lt;pre class="alteven"&gt;&lt;span id="lnum1" class="lnum"&gt;   1:&lt;/span&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum2" class="lnum"&gt;   2:&lt;/span&gt;         &lt;span class="attr"&gt;xmlns:dataview&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;javascript:Sys.UI.DataView&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum3" class="lnum"&gt;   3:&lt;/span&gt;         &lt;span class="attr"&gt;sys:activate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum4" class="lnum"&gt;   4:&lt;/span&gt;     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;tools&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum5" class="lnum"&gt;   5:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Add&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;addBlog()&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum6" class="lnum"&gt;   6:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Save&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;BlogService.dataContext.saveChanges()&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum7" class="lnum"&gt;   7:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;button&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Reload&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum8" class="lnum"&gt;   8:&lt;/span&gt;             &lt;span class="attr"&gt;onclick&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;$find('blogList').fetchData(null, null, Sys.Data.MergeOption.overwriteChanges)&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum9" class="lnum"&gt;   9:&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum10" class="lnum"&gt;  10:&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;=&amp;quot;blogList&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum11" class="lnum"&gt;  11:&lt;/span&gt;         &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum12" class="lnum"&gt;  12:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:dataprovider&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ BlogService.dataContext }}&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum13" class="lnum"&gt;  13:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:fetchoperation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Blogs&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum14" class="lnum"&gt;  14:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:ondataloading&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ dataLoading }}&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum15" class="lnum"&gt;  15:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:autofetch&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum16" class="lnum"&gt;  16:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:selecteditemclass&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;blogSelected&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum17" class="lnum"&gt;  17:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:initialselectedindex&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum18" class="lnum"&gt;  18:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:sys-key&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;master&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum19" class="lnum"&gt;  19:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:oncommand&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ dvCommand }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum20" class="lnum"&gt;  20:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;blogBlock&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;sys:command&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Select&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum21" class="lnum"&gt;  21:&lt;/span&gt;             &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;blogTools&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum22" class="lnum"&gt;  22:&lt;/span&gt;                 &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;div&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;blogDelete&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;sys:command&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Delete&amp;quot;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum23" class="lnum"&gt;  23:&lt;/span&gt;                     &lt;span class="attr"&gt;sys:commandargument&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{$index}}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;X&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum24" class="lnum"&gt;  24:&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum25" class="lnum"&gt;  25:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum26" class="lnum"&gt;  26:&lt;/span&gt;             &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;img&lt;/span&gt; &lt;span class="attr"&gt;alt&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding Name}&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;height&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;75&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;100&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum27" class="lnum"&gt;  27:&lt;/span&gt;                 &lt;span class="attr"&gt;sys:src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding Url, convert=toSnapshot}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum28" class="lnum"&gt;  28:&lt;/span&gt;             &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;hr&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum29" class="lnum"&gt;  29:&lt;/span&gt;             &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding Url}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{binding Name}&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;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum30" class="lnum"&gt;  30:&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum31" class="lnum"&gt;  31:&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum32" class="lnum"&gt;  32:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum33" class="lnum"&gt;  33:&lt;/span&gt;     &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;hr&lt;/span&gt; &lt;span class="attr"&gt;style&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;clear:left;&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum34" class="lnum"&gt;  34:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum35" class="lnum"&gt;  35:&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;=&amp;quot;detailView&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template detailsForm&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum36" class="lnum"&gt;  36:&lt;/span&gt;         &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum37" class="lnum"&gt;  37:&lt;/span&gt;         &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding selectedData, source={{master}} }&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum38" class="lnum"&gt;  38:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Name: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding Name}&amp;quot;&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;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum39" class="lnum"&gt;  39:&lt;/span&gt;         &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Url: &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;input&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;value&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{binding Url}&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum40" class="lnum"&gt;  40:&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;!--CRLF--&gt;

    &lt;pre class="alteven"&gt;&lt;span id="lnum41" class="lnum"&gt;  41:&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Let’s go through the code in chunks&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Lines 1 – 3&lt;/strong&gt;: This shouldn’t be anything new, you first saw this when working with the &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;DataView declaratively&lt;/a&gt;.&amp;#160; &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Lines 4 – 9:&lt;/strong&gt; This section defines the buttons that allow us to Add, Save, and Reload. 

    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Line 5&lt;/strong&gt;: For adding, I’m calling a custom JavaScript function which you’ll see in a moment, addBlog(). &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 6&lt;/strong&gt;: Using the ADO.NET Data Context, we can persist the changes back to the database.&amp;#160; Instead of simply defining a variable (e.g. dataContext), I created a simple JavaScript object (BlogService) to hold the properties that we need to work with (dataContext, which is a Sys.Data.AdoNetDataContext, and an observable array “data” that is made observable with Sys.Observer.makeObservable).&amp;#160; You’ll see this in the JavaScript code.&lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 7 &amp;amp; 8:&lt;/strong&gt; This input button reloads the data.&amp;#160; This uses the method “fetchData” that is found on the DataView object.&amp;#160; The $find shortcut gets the DataView from the blogList DIV element, allowing us to call fetchData.&amp;#160; It takes four parameters, a success callback, failed callback, merge option, and a user context.&amp;#160; For the sake of reloading the DataView, the first two parameters (the callbacks) are null since the DataView handles those for us. The third is a type of &lt;a href="http://msdn.microsoft.com/en-us/library/dd483403(VS.100).aspx" target="_blank"&gt;Sys.Data.MergeOption&lt;/a&gt; and we want to reload everything from the server.&amp;#160; Finally, we don’t need to specify anything for the user context, so that parameter is excluded. 

        &lt;br /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Lines 10 – 19:&lt;/strong&gt; This is the setup of our “master” div.&amp;#160; This displays the website thumbnails, contains a delete button, and allows us to select an item. 

    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Line 10:&lt;/strong&gt; Nothing new here, just an id and a class of “sys-template.”&amp;#160; Remember, this class needs to be on all of your DataViews and you should have a style defined as “display: none;” for this.&amp;#160; Doing this permits the AJAX library to show the content only after it has been bound. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 11: &lt;/strong&gt;You’ve seen this many times before, we’re simply attaching the DataView “behavior” to the div. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 12: &lt;/strong&gt;Now we begin setting the properties we need for the DataView.&amp;#160; Here we are telling the DataView to use a &lt;a href="http://msdn.microsoft.com/en-us/library/dd393657(VS.100).aspx" target="_blank"&gt;dataProvider&lt;/a&gt;.&amp;#160; The provider here is a Sys.Data.AdoNetDataContext and is defined in our JavaScript code. I’ve assigned it to a simple object, “BlogService” to keep the global variables in one place. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 13:&lt;/strong&gt; The fetchOperation is used to define the entity set (from ADO.NET Data Services) that we want to display.&amp;#160; There is only one in this example and that is “Blogs.”&amp;#160; Recall we accessed this earlier using the browser (e.g. “BlogService.svc/Blogs”). &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 14:&lt;/strong&gt; This is an important event that is being wired up &lt;a href="http://msdn.microsoft.com/en-us/library/dd483464(VS.100).aspx" target="_blank"&gt;dataLoading&lt;/a&gt; via the &lt;a href="http://msdn.microsoft.com/en-us/library/dd483408(VS.100).aspx" target="_blank"&gt;onDataLoading&lt;/a&gt; method. This fires when, you guessed it, the data loads.&amp;#160; Here we’re calling a custom JavaScript function named “dataLoading” that I have defined in the page.&amp;#160; Within this function that you’ll see in the JavaScript code below, the data is put into an observable collection.&amp;#160; This collection is where our changes will take place and how the DataView and the live bindings actually do the automatic updates.&amp;#160; All thanks to the &lt;a href="http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx" target="_blank"&gt;Sys.Observer&lt;/a&gt; object.&amp;#160;&amp;#160; &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 15:&lt;/strong&gt; You saw this back in my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;client templates post&lt;/a&gt; when using the WCF service.&amp;#160; Setting &lt;a href="http://msdn.microsoft.com/en-us/library/dd393610(VS.100).aspx" target="_blank"&gt;autoFetch&lt;/a&gt; to true is used when we have a dataProvider.&amp;#160; This tells the DataView to retrieve the data when the page loads. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 16 &amp;amp; 17:&lt;/strong&gt; The DataView has built-in functionality for handling item selection.&amp;#160; In line 16, we can define a CSS class for the item when it is selected (&lt;a href="http://msdn.microsoft.com/en-us/library/dd393577(VS.100).aspx" target="_blank"&gt;selectedItemClass&lt;/a&gt;).&amp;#160; In line 17, we are telling the DataView to initially select the first item in the list when the page loads (&lt;a href="http://msdn.microsoft.com/en-us/library/dd409286(VS.100).aspx" target="_blank"&gt;initialSelectedIndex&lt;/a&gt;). &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 18: &lt;/strong&gt;The purpose of &lt;strong&gt;sys-key&lt;/strong&gt; is to create a local variable that is a reference to the current component.&amp;#160; This allows us to refer to it (line 37), without needing to use $find.&amp;#160; (Thanks to &lt;a href="http://weblogs.asp.net/bleroy/archive/2009/03/18/microsoft-ajax-4-0-preview-4-now-available.aspx#6995062" target="_blank"&gt;Bertrand Le Roy for pointing this out&lt;/a&gt;) &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 19:&lt;/strong&gt; This may look familiar from server-side code that you have written (e.g. DataGrid).&amp;#160; The &lt;a href="http://msdn.microsoft.com/en-us/library/dd393672(VS.100).aspx" target="_blank"&gt;onCommand&lt;/a&gt; method allows us to handle commands that are raised from the component.&amp;#160; The reason for handling this is the custom “delete” command on Line 22.&amp;#160; &lt;br /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Lines 20 – 31:&lt;/strong&gt; This is the master DataView’s content. 

    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Line 20:&lt;/strong&gt; The first of two commands that we need to handle. Select is a command that the DataView handles automatically for us.&amp;#160; When you click inside the div, the DataView handles this event by setting the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409319(VS.100).aspx" target="_blank"&gt;selectedData&lt;/a&gt; property (which will be used in the edit form on Line 37), setting the &lt;a href="http://msdn.microsoft.com/en-us/library/dd393725(VS.100).aspx" target="_blank"&gt;selectedIndex&lt;/a&gt; property, and also setting the &lt;a href="http://msdn.microsoft.com/en-us/library/dd393577(VS.100).aspx" target="_blank"&gt;selectedItemClass&lt;/a&gt;. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 22 &amp;amp; 23:&lt;/strong&gt; The second command that we need to handle is delete.&amp;#160; To do this, we set the sys:command to “Delete” on Line 22.&amp;#160; This command will be bubbled up to our custom handler since we set the onCommand method of the DataView on Line 19.&amp;#160; In addition to custom events, we can have custom event args.&amp;#160; {{ $index }} evaluates to the index of the item as generated by the underlying collection. &lt;/li&gt;

      &lt;li&gt;&lt;strong&gt;Line 27: &lt;/strong&gt;This line is of interest since we are using the convert property of the binding.&amp;#160; Because of this, the src attribute needs to be prefixed with the sys namespace.&amp;#160; In some instances like this one, we need to prefix the attribute with sys in order to obtain the full functionality.&amp;#160; The convert function specified here is a custom one that will either set an empty image or change the src to the one that grabs the website snapshot. 

        &lt;br /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Lines 35 – 40:&lt;/strong&gt; This is the “detail” DataView, or in our case the edit form. 

    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Line 37:&lt;/strong&gt; This is really the only item of interest in the edit form since everything else is pretty standard.&amp;#160; Here the binding is a bit special.&amp;#160; We are binding to the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409319(VS.100).aspx" target="_blank"&gt;selectedData&lt;/a&gt; property of the “master” DataView.&amp;#160; The {{master}} refers to the sys-key defined in Line 18. &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that you fully understand the HTML, let’s move onto the JavaScript.&amp;#160; For the JavaScript I have added all of the comments inline instead of a full discussion after the fact to make it easier.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="rem"&gt;// Create an empty object to store global variables&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//   - dataContext: The AdoNetDataContext&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//   - data: An observable &amp;quot;view&amp;quot; of the data&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; BlogService = {};&lt;br /&gt; &lt;br /&gt;BlogService.dataContext = $create(&lt;br /&gt;    Sys.Data.AdoNetDataContext,&lt;br /&gt;    { serviceUri: &lt;span class="str"&gt;&amp;quot;BlogService.svc&amp;quot;&lt;/span&gt; }&lt;br /&gt;);&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; dataLoading(sender, args) {&lt;br /&gt;    &lt;span class="rem"&gt;// BlogService.data is where our changes will take place&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// You can think of this as a &amp;quot;ViewModel&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// See http://forums.asp.net/p/1405579/3060650.aspx for more info&lt;/span&gt;&lt;br /&gt;    BlogService.data = args.get_data();&lt;br /&gt;    Sys.Observer.makeObservable(BlogService.data);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; addBlog() {&lt;br /&gt;    &lt;span class="rem"&gt;// Create a new Blog entity&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;var&lt;/span&gt; newBlog = { Name: &lt;span class="str"&gt;'Blog Name'&lt;/span&gt;, Url: &lt;span class="str"&gt;''&lt;/span&gt; };&lt;br /&gt;     &lt;br /&gt;    &lt;span class="rem"&gt;// Add the blog to the DataContext&lt;/span&gt;&lt;br /&gt;    BlogService.dataContext.insertEntity(newBlog, &lt;span class="str"&gt;&amp;quot;Blogs&amp;quot;&lt;/span&gt;);&lt;br /&gt;    &lt;br /&gt;    &lt;span class="rem"&gt;// Add the blog to our &amp;quot;ViewModel&amp;quot;&lt;/span&gt;&lt;br /&gt;    BlogService.data.add(newBlog);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; toSnapshot(url) {&lt;br /&gt;    &lt;span class="rem"&gt;// Either return a blank image&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (url.substring(0, 7) !== &lt;span class="str"&gt;'http://'&lt;/span&gt;) &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;'nothumbnail.jpg'&lt;/span&gt;;&lt;br /&gt;     &lt;br /&gt;    &lt;span class="rem"&gt;// Or use the bitpixels.com path to get a thumbnail&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="str"&gt;'http://img.bitpixels.com/getthumbnail?url='&lt;/span&gt; + url;&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; dvCommand(sender, args) {&lt;br /&gt;    &lt;span class="rem"&gt;// Test for our custom delete command&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (args.get_commandName() === &lt;span class="str"&gt;'Delete'&lt;/span&gt;) {&lt;br /&gt;        &lt;span class="rem"&gt;// Get the index that we set on the delete button&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; index = args.get_commandArgument();&lt;br /&gt;        &lt;br /&gt;        &lt;span class="rem"&gt;// Get the entity from the local data&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; deletedBlog = BlogService.data[index];&lt;br /&gt;        &lt;br /&gt;        &lt;span class="rem"&gt;// Remove the entity from the ADO.NET Data Service&lt;/span&gt;&lt;br /&gt;        BlogService.dataContext.removeEntity(deletedBlog);&lt;br /&gt;        &lt;br /&gt;        &lt;span class="rem"&gt;// Remove from the local collection&lt;/span&gt;&lt;br /&gt;        BlogService.data.remove(deletedBlog);&lt;br /&gt; &lt;br /&gt;        &lt;span class="rem"&gt;// Set the DataView's selected index&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (index &amp;gt;= BlogService.data.length) index--;&lt;br /&gt;        $find(&lt;span class="str"&gt;'blogList'&lt;/span&gt;).set_selectedIndex(index);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;ASP.NET 4.0 is one exciting release.&amp;#160; The ASP.NET AJAX features shown here are incredibly cool.&amp;#160; The best thing about ASP.NET AJAX is that we can start using the scripts today in our ASP.NET 3.5 SP1 applications thanks to Preview 4.&amp;#160; No need to install anything on the server, just simply reference the scripts.&amp;#160; I’m excited to see documentation has been released for ASP.NET 4.0 Beta 1 and I would recommend checking out the &lt;a href="http://msdn.microsoft.com/en-us/library/bb397536(VS.100).aspx" target="_blank"&gt;ASP.NET AJAX Client Reference&lt;/a&gt; on MSDN.&amp;#160; I’ve also included many links to it throughout this post.&amp;#160; Another helpful reference is the ASP.NET 4.0 and VS 2010 whitepaper, where you can see all the features of ASP.NET 4.0 as well as the &lt;a href="http://www.asp.net/learn/whitepapers/aspnet40/#_Toc223325467" target="_blank"&gt;ASP.NET AJAX functionality&lt;/a&gt;.&amp;#160; &lt;/p&gt;

&lt;p&gt;For other blogs on ASP.NET AJAX 4.0, be sure to check out:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Bertrand Le Roy’s blog - &lt;a title="http://weblogs.asp.net/bleroy/" href="http://weblogs.asp.net/bleroy/"&gt;http://weblogs.asp.net/bleroy/&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;Jim Wang’s blog: &lt;a title="http://weblogs.asp.net/jimwang/default.aspx" href="http://weblogs.asp.net/jimwang/default.aspx"&gt;http://weblogs.asp.net/jimwang/default.aspx&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;Politian’s blog: &lt;a title="http://politian.wordpress.com/" href="http://politian.wordpress.com/"&gt;http://politian.wordpress.com/&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;#160;&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:0767317B-992E-4b12-91E0-4F059A8CECA8:7e9d6233-b43c-420b-a343-641e4819c088" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX" rel="tag"&gt;AJAX&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aEyXxJvnX0eY-WD_JeaO7TJE4jQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aEyXxJvnX0eY-WD_JeaO7TJE4jQ/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/aEyXxJvnX0eY-WD_JeaO7TJE4jQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aEyXxJvnX0eY-WD_JeaO7TJE4jQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kmUsihb71Io:ET2LZjFl4Ik:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kmUsihb71Io:ET2LZjFl4Ik:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kmUsihb71Io:ET2LZjFl4Ik:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kmUsihb71Io:ET2LZjFl4Ik:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kmUsihb71Io:ET2LZjFl4Ik:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kmUsihb71Io:ET2LZjFl4Ik:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kmUsihb71Io:ET2LZjFl4Ik:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kmUsihb71Io:ET2LZjFl4Ik:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/kmUsihb71Io" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/kmUsihb71Io/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=270bb50f-fc9a-4d64-9fa4-7193c3712e58</guid>
      <pubDate>Wed, 27 May 2009 10:48:29 -0500</pubDate>
      <category>AJAX</category>
      <category>ASP.NET</category>
      <category>JavaScript</category>
      <category>ADO.NET Data Services</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=270bb50f-fc9a-4d64-9fa4-7193c3712e58</pingback:target>
      <slash:comments>9</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=270bb50f-fc9a-4d64-9fa4-7193c3712e58</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/05/27/ASP.NET-4.0-AJAX-Preview-4-Data-Binding.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=270bb50f-fc9a-4d64-9fa4-7193c3712e58</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=270bb50f-fc9a-4d64-9fa4-7193c3712e58</feedburner:origLink></item>
    <item>
      <title>ASP.NET 4.0 AJAX – Preview 4 – JavaScript Observer Pattern</title>
      <description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 15px 0px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Examine" border="0" alt="Examine" align="left" src="http://blogs.visoftinc.com/image.axd?picture=Examine.jpg" width="224" height="224" /&gt; In my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;last post&lt;/a&gt; on ASP.NET AJAX 4.0, we took a look at the new &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;DataView ASP.NET AJAX control&lt;/a&gt;.&amp;#160; We saw that by using a DataView, we could easily bind data with JavaScript or declaratively with a few attributes.&amp;#160; In this post, we’ll look at another feature of the ASP.NET 4.0 AJAX Library, the &lt;a href="http://en.wikipedia.org/wiki/Observer_pattern" target="_blank"&gt;Observer design pattern&lt;/a&gt; for plain JavaScript objects.&amp;#160; The pattern is implemented in the client side Sys.Observer class.&amp;#160; This feature is used internally within the new version of ASP.NET AJAX for live-binding and the &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;DataView control&lt;/a&gt;.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Here we will be using Preview 4 of the ASP.NET AJAX Library, which can be downloaded from &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645" target="_blank"&gt;CodePlex&lt;/a&gt;.&amp;#160; Remember that these components are still in &amp;quot;preview&amp;quot; mode (meaning no Microsoft support), though they are usable at your own risk.&amp;#160; For more information, you can check out the &lt;a href="http://aspnet.codeplex.com/license"&gt;license&lt;/a&gt; on CodePlex.&amp;#160; I highly recommend downloading the samples available for Preview 4, which are also available at &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645" target="_blank"&gt;CodePlex&lt;/a&gt;.&amp;#160; The samples give you a good look at what is coming.&amp;#160; &lt;/p&gt;  &lt;p&gt;In this post, we’ll take a closer look at the Sys.Observer class, witness the problems it solves, and take a look at a few examples.&amp;#160; &lt;/p&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;A Quick Look at JavaScript Objects&lt;/h2&gt;  &lt;p&gt;To this day, I still know developers who either don’t understand, don’t want to understand, or flat out loathe JavaScript.&amp;#160; I suppose this really has to do with it &lt;a href="http://javascript.crockford.com/javascript.html" target="_blank"&gt;being totally misunderstood&lt;/a&gt;, but in a &lt;a href="http://en.wikipedia.org/wiki/Web_2.0" target="_blank"&gt;Web 2.0&lt;/a&gt; world, a web developer should embrace the language.&amp;#160; Especially with wonderful frameworks like &lt;a href="http://encosia.com/2009/05/13/what-aspnet-developers-should-know-about-jquery/" target="_blank"&gt;jQuery&lt;/a&gt; and the Microsoft AJAX Library&amp;#160; This section is a quick overview of JavaScript objects in case you aren’t familiar with them.&amp;#160; &lt;/p&gt;  &lt;p&gt;Objects in JavaScript can be described as hashtables, they are collections of names and values,&amp;#160; for example:&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;div id="codeSnippetWrapper"&gt;     &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="rem"&gt;// An empty object&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; person = {};&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Another way of defining an object&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; person2 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Object();&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Adding a name/value pair (a local variable)&lt;/span&gt;&lt;br /&gt;person[&lt;span class="str"&gt;&amp;quot;firstName&amp;quot;&lt;/span&gt;] = &lt;span class="str"&gt;'Damien'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// You can also use the dot notation instead of subscript notation&lt;/span&gt;&lt;br /&gt;person.lastName = &lt;span class="str"&gt;'White'&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// And you can define objects using the object literal notation&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; person = { firstName:&lt;span class="str"&gt;'Damien'&lt;/span&gt;, lastName:&lt;span class="str"&gt;'White'&lt;/span&gt; };&lt;/pre&gt;

    &lt;p&gt;&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This is by no means definitive. If you have JavaScript-phobia, you should &lt;a href="http://www.crockford.com/javascript/survey.html" target="_blank"&gt;start here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;The Object Modification Problem&lt;/h2&gt;

&lt;p&gt;Let’s say you have a simple object with a couple of properties.&amp;#160; Note that JavaScript doesn’t have properties as we know them in .NET, they are just local variables like those defined on the person object in the previous code snippet, however there are conventions for &lt;a href="http://www.asp.net/AJAX/Documentation/Live/tutorials/EnhancingJavaScriptTutorial.aspx" target="_blank"&gt;emulating them&lt;/a&gt; with functions.&amp;#160; Back to our simple object, let’s say that you need to be notified if the object changes.&amp;#160; Take the following snippet, note I’m using the jQuery in order to simplify the code (e.g. &lt;a href="http://docs.jquery.com/Manipulation/append" target="_blank"&gt;append&lt;/a&gt;, and &lt;a href="http://docs.jquery.com/Events/ready" target="_blank"&gt;document ready&lt;/a&gt;). &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div id="codeSnippetWrapper"&gt;
    &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; latestBlogPost = {&lt;br /&gt;    name: &lt;span class="str"&gt;'ASP.NET 4.0 AJAX - Preview 4 - Client Templates'&lt;/span&gt;,&lt;br /&gt;    url: &lt;span class="str"&gt;'http://blogs.visoftinc.com/archive/2009/04/28/'&lt;/span&gt; +&lt;br /&gt;         &lt;span class="str"&gt;'ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx'&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;        &lt;br /&gt;&lt;span class="rem"&gt;// Displays the object&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; displayLatestBlog() {&lt;br /&gt;    &lt;span class="kwrd"&gt;var&lt;/span&gt; link = &lt;span class="str"&gt;'&amp;lt;a href=&amp;quot;'&lt;/span&gt; + latestBlogPost.url + &lt;span class="str"&gt;'&amp;quot;&amp;gt;'&lt;/span&gt; + latestBlogPost.name + &lt;span class="str"&gt;'&amp;lt;/a&amp;gt;'&lt;/span&gt;;&lt;br /&gt;    $(&lt;span class="str"&gt;'#latestBlog'&lt;/span&gt;).empty().append(link);&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Show the latest blog post on document ready&lt;/span&gt;&lt;br /&gt;$(&lt;span class="kwrd"&gt;function&lt;/span&gt;() {&lt;br /&gt;    displayLatestBlog();&lt;br /&gt;});&lt;/pre&gt;

    &lt;br /&gt;&lt;/div&gt;
Very simple example, I’m just displaying the link in a span (id = latestBlog) when the page loads.&amp;#160; Now, let’s say that the latest latestBlogPost object changes.&lt;/div&gt;

&lt;div id="codeSnippetWrapper"&gt;After the change, the displayed latest blog post is now out of date.&amp;#160; In this simple example it isn’t too big of a deal to handle this.&amp;#160; However, there is a bigger question at large here, what if we wanted to know when the object changed?&amp;#160; We could implement some logic in our latestBlogPost object in order to raise events when a property changes (such as is done in many of the &lt;a href="http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27326" target="_blank"&gt;ASP.NET AJAX Control Toolkit&lt;/a&gt;, by the way, have you checked out the &lt;a href="http://weblogs.asp.net/bleroy/archive/2009/05/13/new-release-of-the-ajax-control-toolkit.aspx" target="_blank"&gt;latest version&lt;/a&gt;?).&amp;#160; This works fine for something along the lines of a control, but it doesn’t make sense for just plain JavaScript objects.&amp;#160; Imagine having to add get_ and set_ methods that raise an event each time they are changed for each variable in an object that is passed from the server via JSON.&amp;#160; That is where the Sys.Observer class comes into play.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;h2&gt;Observing Changes with Sys.Observer&lt;/h2&gt;

&lt;p&gt;The new Sys.Observer class is a solution to the problem that we defined in the last section.&amp;#160; Let’s start by seeing how we would handle notification of object changes.&amp;#160; I’ll be appending this code to the previous snippet.&amp;#160; &lt;/p&gt;

&lt;div&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="rem"&gt;// Make the object observable&lt;/span&gt;&lt;br /&gt;Sys.Observer.makeObservable(latestBlogPost);&lt;br /&gt;Sys.Observer.addPropertyChanged(latestBlogPost, displayLatestBlog);&lt;br /&gt;          &lt;br /&gt;&lt;span class="rem"&gt;// Change the Latest Blog Post using the Sys.Observer&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; changeLatestBlogPost() {&lt;br /&gt;    &lt;span class="rem"&gt;// Use beginUpdate to prevent changes from being reported until we are done.&lt;/span&gt;&lt;br /&gt;    latestBlogPost.beginUpdate();&lt;br /&gt; &lt;br /&gt;    &lt;span class="rem"&gt;// Set the properties in an observable way&lt;/span&gt;&lt;br /&gt;    latestBlogPost.setValue(&lt;span class="str"&gt;'name'&lt;/span&gt;, &lt;span class="str"&gt;'ASP.NET 4.0 AJAX - Preview 4 - JavaScript Observer Pattern'&lt;/span&gt;);&lt;br /&gt;    latestBlogPost.setValue(&lt;span class="str"&gt;'url'&lt;/span&gt;, &lt;span class="str"&gt;'http://blogs.visoftinc.com/archive/2009/05/21/'&lt;/span&gt; +&lt;br /&gt;        &lt;span class="str"&gt;'ASP.NET-4.0-AJAX-Preview 4-JavaScript-Observer-Pattern.aspx'&lt;/span&gt;);&lt;br /&gt; &lt;br /&gt;    &lt;span class="rem"&gt;// Finish, now the listeners will get the update&lt;/span&gt;&lt;br /&gt;    latestBlogPost.endUpdate();&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;I realize this is an extremely simple example, but it shows the basics behind how the &lt;a href="http://msdn.microsoft.com/en-us/library/dd393710(VS.100).aspx" target="_blank"&gt;Sys.Observer&lt;/a&gt; class works.&lt;/p&gt;

&lt;p&gt;The first thing being done is making the object “observable.”&amp;#160; The &lt;a href="http://msdn.microsoft.com/en-us/library/dd393633(VS.100).aspx" target="_blank"&gt;makeObservable&lt;/a&gt; method adds the observable methods to it.&amp;#160; You don’t need to call the&amp;#160; makeObservable method if you don’t want, but then you would need to call the fully qualified methods of the Sys.Observer class, for example (looking at the beginUpdate method call from the above snippet):&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="rem"&gt;// We can call beginUpdate like this thanks to makeObservable&lt;/span&gt;&lt;br /&gt;latestBlogPost.beginUpdate();&lt;br /&gt; &lt;br /&gt;&lt;span class="rem"&gt;// Otherwise we would have to call it like this:&lt;/span&gt;&lt;br /&gt;Sys.Observer.beginUpdate(latestBlogPost);&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Personally, I think the makeObservable call makes the method calls a little cleaner, but the disadvantage is no IntelliSense on the “observable” object.&lt;/p&gt;

&lt;p&gt;Back to the code snippet.&amp;#160; In the second line, we are adding an event handler for the propertyChanged event using the &lt;a href="http://msdn.microsoft.com/en-us/library/dd393724(VS.100).aspx" target="_blank"&gt;addPropertyChanged&lt;/a&gt; method.&amp;#160; This is all we need to do in order to register as a listener, our method (displayLatestBlog from the earlier code snippet) will be called each time a property on the object changes.&amp;#160; Now every property change may be a bit overkill, thankfully we can control when the listener receives notification.&amp;#160; In the first step in the changeLatestBlogPost() method, I’m doing just that, calling the &lt;a href="http://msdn.microsoft.com/en-us/library/dd409238(VS.100).aspx" target="_blank"&gt;beginUpdate&lt;/a&gt; Sys.Observer method delays notifications from being fired until we are done with our editing.&amp;#160; In the next two lines, I’m using &lt;a href="http://msdn.microsoft.com/en-us/library/dd393596(VS.100).aspx" target="_blank"&gt;setValue&lt;/a&gt; in order to let the Sys.Observer know that this is a change that should be observed.&amp;#160; Finally, a call to endUpdate will tell the Sys.Observer that it should now notify listeners of the changes to our object.&amp;#160; Without the beginUpdate and endUpdate call, the Sys.Observer class would have sent notifications each time we called the setValue method. 

  &lt;br /&gt;&lt;/p&gt;

&lt;h2&gt;Sys.Observer, JavaScript Arrays, and the DataView&lt;/h2&gt;

&lt;p&gt;Let’s look at something a little more exciting.&amp;#160; Back in my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;post on the DataView&lt;/a&gt;, we looked at setting the DataView using a simple JavaScript array.&amp;#160; Let’s revisit the example using the Sys.Observer class.&amp;#160; Like the previous examples, I’ll be using just a standard HTML page, no ASP.NET server-side code.&amp;#160; Being able to use the ASP.NET AJAX Library OUTSIDE of ASP.NET is often a point that developers seem to miss, so hopefully all of these HTML examples will drive the point home.&lt;/p&gt;

&lt;p&gt;I will be building upon the declarative binding example from my &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;earlier post&lt;/a&gt;, so you can reference the full explanation of the DataView code if you need to.&amp;#160; I’ll just focus on the JavaScript code for the sake of this example, but you can find the full source in the download (available at the end of this post).&amp;#160; To refresh your memory a bit, we had a simple array in the &lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;DataView example&lt;/a&gt;:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; nfcEast = [&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;New York Giants&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.giants.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Philadelphia Eagles&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.philadelphiaeagles.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Dallas Cowboys&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.dallascowboys.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Washington Redskins&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.redskins.com/&amp;quot;&lt;/span&gt; }&lt;br /&gt;]&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;We then used declarative binding to bind the list to the DataView, which in our case was a simple unordered list:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nflList&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ nfcEast }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ Homepage }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{{ Team }}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Now, let’s make our array “observable,” where again I’ll use the &lt;a href="http://msdn.microsoft.com/en-us/library/dd393633(VS.100).aspx" target="_blank"&gt;makeObservable&lt;/a&gt; method.&amp;#160; One thing to note on this example, I’m not setting a handler to capture the changes.&amp;#160; The reasoning behind this is due to the functionality built in to the DataView control.&amp;#160; Normally to capture changes of a JavaScript array, you would wire up an event handler for the Collection Changed event by calling the method &lt;a href="http://msdn.microsoft.com/en-us/library/dd393628(VS.100).aspx" target="_blank"&gt;addCollectionChanged&lt;/a&gt; on Sys.Observer.&amp;#160; The DataView however automatically listens for changes to an underlying “observable” collection.&amp;#160;&amp;#160; All we need to do now is change our collection using the Sys.Observer methods for a collection.&amp;#160; The Sys.Observer has quite a few methods for doing just this.&amp;#160; They are &lt;a href="http://msdn.microsoft.com/en-us/library/dd393579(VS.100).aspx" target="_blank"&gt;add&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd393800(VS.100).aspx" target="_blank"&gt;addRange&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd409269(VS.100).aspx" target="_blank"&gt;clear&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd393670(VS.100).aspx" target="_blank"&gt;insert&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/dd393608(VS.100).aspx" target="_blank"&gt;remove&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/dd409244(VS.100).aspx" target="_blank"&gt;removeAt&lt;/a&gt;.&amp;#160; For this example, we’ll just look at a couple of the methods. &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;Sys.Observer.makeObservable(nfcEast);&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; removeTeam() {&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (nfcEast.length &amp;gt; 0) {&lt;br /&gt;        nfcEast.removeAt(0);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; moveTopTeamToBottom() {&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (nfcEast.length &amp;gt; 1) {&lt;br /&gt;        nfcEast.beginUpdate();&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; topTeam = nfcEast[0];&lt;br /&gt;        nfcEast.removeAt(0);&lt;br /&gt;        nfcEast.insert(nfcEast.length + 1, topTeam);&lt;br /&gt;&lt;br /&gt;        nfcEast.endUpdate();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This is all to code that is needed in order to update our array and thereby update our DataView unordered list.&amp;#160; These are two pretty simple methods, removeTeam and moveTopTeamToBottom.&amp;#160; The first simply removes the top team from the list, while the second does a “batch change” moving the top team in the list to bottom using &lt;a href="http://msdn.microsoft.com/en-us/library/dd409238(VS.100).aspx" target="_blank"&gt;beginUpdate&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/dd393782(VS.100).aspx" target="_blank"&gt;endUpdate&lt;/a&gt; like you saw earlier.&amp;#160; Now for the “magic”, notice we’re not handling the changes at all.&amp;#160; When you fire up the example, and click on the buttons to call the appropriate functions, you’ll notice that the DataView automatically rebinds after each of these calls.&amp;#160; You can see an example of the functionality in the clip below (Figure 1).&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=SysObserverDataView.gif"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sys.Observer and DataView Sample " border="0" alt="Sys.Observer and DataView Sample " src="http://blogs.visoftinc.com/image.axd?picture=SysObserverDataView_thumb.gif" width="212" height="144" /&gt;&lt;/a&gt; 

  &lt;br /&gt;&lt;strong&gt;Figure 1 – The DataView and Sys.Observer Example&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;It’s very handy to be able to get notifications for plain JavaScript objects like this.&amp;#160; Having the Sys.Observer class at our disposal can empower us to remove custom get/set logic in our client-side classes, and use a standard pattern for this problem.&amp;#160; By doing this, other controls (e.g. Sys.UI.DataView) can then subscribe as listeners in a common way for changes to our object without having to know about custom events that we have created.&amp;#160; &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:fb3a1972-4489-4e52-abe7-25a00bb07fdf:0e66ae44-eb10-4116-a628-96dedf327892" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;Looking to try the code in the post out for yourself? &lt;a href="http://blogs.visoftinc.com/file.axd?file=ObserverSamples_5.zip"&gt;Download the Samples - 84K&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;For more information on Sys.Observer and ASP.NET AJAX 4.0, here are a few other posts on the topic:&lt;/p&gt;

&lt;div&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/11/09/asp-net-ajax-4-0-observing-updates-to-pojos-plain-ole-javascript-objects.aspx" target="_blank"&gt;ASP.NET AJAX 4.0: Observing updates to POJOs (Plain 'Ole JavaScript Objects)&lt;/a&gt; – Dave Reed (based on ASP.NET AJAX 4.0 Preview 3) &lt;/li&gt;

    &lt;li&gt;&lt;a href="http://blogs.msdn.com/shahpiyush/archive/2009/02/01/asp-net-ajax-4-0-client-templates-in-depth.aspx" target="_blank"&gt;ASP.NET AJAX 4.0 Client Templates in depth&lt;/a&gt; – Piyush Shah &lt;/li&gt;

    &lt;li&gt;&lt;a href="http://updatepanel.net/2008/11/14/getting-started-with-sys-binding-part-2/" target="_blank"&gt;Getting started with Sys.Binding – Part 2&lt;/a&gt; – UpdatePanel.net &lt;/li&gt;

    &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx"&gt;ASP.NET 4.0 AJAX - Preview 4 - Client Templates&lt;/a&gt; – Damien White &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:80d48615-11f4-474f-a535-24523761431a" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX" rel="tag"&gt;AJAX&lt;/a&gt;,&lt;a href="http://technorati.com/tags/JavaScript" rel="tag"&gt;JavaScript&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_9NFrYH-l9hj_Trpeeg4gJvL9HY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_9NFrYH-l9hj_Trpeeg4gJvL9HY/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/_9NFrYH-l9hj_Trpeeg4gJvL9HY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_9NFrYH-l9hj_Trpeeg4gJvL9HY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VvEr6LAewPg:25gFxBgG0Rk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VvEr6LAewPg:25gFxBgG0Rk:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VvEr6LAewPg:25gFxBgG0Rk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VvEr6LAewPg:25gFxBgG0Rk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VvEr6LAewPg:25gFxBgG0Rk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VvEr6LAewPg:25gFxBgG0Rk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=VvEr6LAewPg:25gFxBgG0Rk:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=VvEr6LAewPg:25gFxBgG0Rk:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/VvEr6LAewPg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/VvEr6LAewPg/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=ec43dc88-7359-472a-99c3-3e5131dd775c</guid>
      <pubDate>Thu, 21 May 2009 11:54:00 -0500</pubDate>
      <category>ASP.NET</category>
      <category>AJAX</category>
      <category>JavaScript</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=ec43dc88-7359-472a-99c3-3e5131dd775c</pingback:target>
      <slash:comments>7</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=ec43dc88-7359-472a-99c3-3e5131dd775c</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/05/21/ASP.NET-4.0-AJAX-Preview-4-JavaScript-Observer-Pattern.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=ec43dc88-7359-472a-99c3-3e5131dd775c</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=ec43dc88-7359-472a-99c3-3e5131dd775c</feedburner:origLink></item>
    <item>
      <title>How To: Adding MVC items to an ASP.NET Web Application</title>
      <description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 15px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="HTML Code" border="0" alt="HTML Code" align="left" src="http://blogs.visoftinc.com/image.axd?picture=Fotolia_12413408_Subscription_L.jpg" width="244" height="164" /&gt; I’ve been experimenting with using ASP.NET MVC inside a standard ASP.NET Web Application (Web Forms).&amp;#160; I really like what’s been released with MVC 1.0 and can see places where existing apps would benefit from the features.&amp;#160; Plus, having just finished &lt;a href="http://www.amazon.com/gp/product/0470384611?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470384611" target="_blank"&gt;Professional ASP.NET MVC 1.0&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470384611" width="1" height="1" /&gt; from Wrox (see my &lt;a href="http://blogs.visoftinc.com/archive/2009/05/17/Book-Review-Wrox-Professional-ASP.NET-MVC-1.0.aspx"&gt;book review&lt;/a&gt;), I couldn’t wait to start using it.&amp;#160; &lt;/p&gt;  &lt;p&gt;The last chapter of the &lt;a href="http://blogs.visoftinc.com/archive/2009/05/17/Book-Review-Wrox-Professional-ASP.NET-MVC-1.0.aspx"&gt;book&lt;/a&gt;, Chapter 12, entitled “&lt;em&gt;Best of Both Worlds: Web Forms and MVC Together,&lt;/em&gt;” discusses configuring an ASP.NET Web Application to support the new ASP.NET MVC features.&amp;#160; Note that adding Web Forms to an ASP.NET MVC project template is much easier (meaning no configuration/reference changes), since ASP.NET MVC is built on top of the ASP.NET Framework.&amp;#160; Anyway, after referencing the required libraries, creating the necessary directories, and updating the web.config, you’ll find that templates for the MVC items (e.g. Controllers, Views), are missing as options.&amp;#160; &lt;/p&gt;  &lt;p&gt;Well after digging around on the web, I found a &lt;a href="http://guyellisrocks.com/coding/hybrid-asp-net-mvc-and-webforms-app/" target="_blank"&gt;solution to the problem&lt;/a&gt;.&amp;#160; It involves editing the project file and adding a guid to the ProjectTypeGuids node.&amp;#160; &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;Caution: Before you do this, make sure that you have ASP.NET MVC 1.0 installed on your machine, also BACKUP your project file before modifying it.&amp;#160; If there is a mistake in the file, Visual Studio won’t load the project properly.&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now that you’ve made a backup, open up the project file using notepad (or your favorite text editor) and look for the ProjectTypeGuids node, for example (Note, line-breaks added for display in these examples, but in the project file everything is on a single line):&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    {349c5851-65df-11da-9384-00065b846f21};&lt;br /&gt;    {fae04ec0-301f-11d3-bf4b-00c04f79efbc}&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;In order to get the MVC items to work, you will add the project type guid of an ASP.NET MVC application.&amp;#160; The Guid that you need is &lt;strong&gt;{603c0e0b-db56-11dc-be95-000d561079b0};&lt;/strong&gt;.&amp;#160; Simply add it to the beginning of the ProjectTypeGuids, for example (again, line-breaks added for display): &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;strong&gt;{603c0e0b-db56-11dc-be95-000d561079b0};&lt;/strong&gt;&lt;br /&gt;    {349c5851-65df-11da-9384-00065b846f21};&lt;br /&gt;    {fae04ec0-301f-11d3-bf4b-00c04f79efbc}&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;br /&gt;

  &lt;p&gt;Save the project file and reload your project.&amp;#160; Now, things work correctly, for example when you right-click inside an action method, you see the option to add a View (Figure 1), and right-clicking on the Controllers folder gives you the option to add a new Controller (Figure 2).&lt;/p&gt;

  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 5px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 1 - Adding a View" border="0" alt="Figure 1 - Adding a View" src="http://blogs.visoftinc.com/image.axd?picture=Figure%201%20-%20Adding%20a%20View.png" width="255" height="173" /&gt;&amp;#160; &lt;br /&gt;&lt;strong&gt;Figure 1 – Adding a View&lt;/strong&gt;&lt;/p&gt;

  &lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 5px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 2 - Adding a Controller" border="0" alt="Figure 2 - Adding a Controller" src="http://blogs.visoftinc.com/image.axd?picture=Figure%202-%20Adding%20a%20Controller.png" width="390" height="115" /&gt; 

    &lt;br /&gt;&lt;strong&gt;Figure 2 – Adding a Controller&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;Remember that by adding the ProjectTypeGuid for MVC, all the members of your team will need to have ASP.NET MVC installed, otherwise they will get errors as described in &lt;a href="http://weblogs.asp.net/leftslipper/archive/2009/01/20/opening-an-asp-net-mvc-project-without-having-asp-net-mvc-installed-the-project-type-is-not-supported-by-this-installation.aspx" target="_blank"&gt;this post&lt;/a&gt;.&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:0767317B-992E-4b12-91E0-4F059A8CECA8:4b931e87-953d-48e5-a021-201db0978d19" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/MVC" rel="tag"&gt;MVC&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Web+Forms" rel="tag"&gt;Web Forms&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0El1qZqAtI6RuhKetYfXIBdJ-mI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0El1qZqAtI6RuhKetYfXIBdJ-mI/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/0El1qZqAtI6RuhKetYfXIBdJ-mI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0El1qZqAtI6RuhKetYfXIBdJ-mI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=x5zRS13VKjE:ghmjXSr63d8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=x5zRS13VKjE:ghmjXSr63d8:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=x5zRS13VKjE:ghmjXSr63d8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=x5zRS13VKjE:ghmjXSr63d8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=x5zRS13VKjE:ghmjXSr63d8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=x5zRS13VKjE:ghmjXSr63d8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=x5zRS13VKjE:ghmjXSr63d8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=x5zRS13VKjE:ghmjXSr63d8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/x5zRS13VKjE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/x5zRS13VKjE/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/05/20/How-To-Adding-MVC-items-to-an-ASP.NET-Web-Application.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=ff23c05d-87fa-4aeb-8802-0313f1b1cd05</guid>
      <pubDate>Wed, 20 May 2009 09:30:10 -0500</pubDate>
      <category>ASP.NET</category>
      <category>MVC</category>
      <category>Visual Studio</category>
      <category>How To</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=ff23c05d-87fa-4aeb-8802-0313f1b1cd05</pingback:target>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=ff23c05d-87fa-4aeb-8802-0313f1b1cd05</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/05/20/How-To-Adding-MVC-items-to-an-ASP.NET-Web-Application.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=ff23c05d-87fa-4aeb-8802-0313f1b1cd05</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=ff23c05d-87fa-4aeb-8802-0313f1b1cd05</feedburner:origLink></item>
    <item>
      <title>Book Review - Wrox Professional ASP.NET MVC 1.0</title>
      <description>&lt;p&gt;&lt;a href="http://www.amazon.com/Professional-ASP-NET-MVC-1-0-Conery/dp/0470384611%3FSubscriptionId%3D0JTCV5ZMHMF7ZYTXGFR2%26tag%3Dvisincblo-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0470384611"&gt;&lt;img style="border-right-width: 0px; margin: 5px 10px 5px 0px; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" alt="Professional ASP.NET MVC 1.0" src="http://ecx.images-amazon.com/images/I/41vsFoLZq9L.jpg" width="191" height="240" /&gt;&lt;/a&gt;Working primarily on web applications, I’ve focused most of my time on ASP.NET Web Forms since the very early betas.&amp;#160; Web Forms were truly a great revolution in the web world.&amp;#160; Once I saw the functionality when it first came out (when I was using ::shudder::&amp;#160; “classic” ASP), I couldn’t wait to start using it.&amp;#160; I began right away with ASP+, as it was &lt;a href="http://en.wikipedia.org/wiki/ASP.NET#History" target="_blank"&gt;called back in 2000&lt;/a&gt;, abandoning &lt;a href="http://en.wikipedia.org/wiki/Visual_InterDev" target="_blank"&gt;Visual Interdev&lt;/a&gt; and ASP, yippee.&amp;#160; The release of &lt;a href="http://en.wikipedia.org/wiki/ASP.NET#Versions" target="_blank"&gt;Version 1.0&lt;/a&gt; came out January 16, 2002, changing the way we work with the web.&lt;/p&gt;  &lt;p&gt;Flash-forward 7 years (9 from the early betas), and the programming world has changed.&amp;#160; With things like TDD (Test Driven Development), AJAX, JSON, jQuery, etc, and the complexity of web applications growing, sometimes Web Forms would get in the way.&amp;#160; To be fair, the Web Form framework is very robust and tries to be helpful, but sometimes we developers like to shoot ourselves in the foot.&amp;#160; One example that I’m sure many of you have experienced is trying to interface with a server-rendered element on the page.&amp;#160; Performing something like a document.getElementById(‘UserName’) in JavaScript doesn’t exactly work as expected when the ID of your textbox is now something along the lines of “ctl00_mainContent_LoginCtrl_UserName,” does it?&amp;#160; On this particular topic, ASP.NET 4.0 has a &lt;a href="http://weblogs.asp.net/asptest/archive/2009/01/06/asp-net-4-0-clientid-overview.aspx" target="_blank"&gt;solution for this problem&lt;/a&gt;, but that isn’t the focus of this post.&amp;#160; The Client Id problem, is just one example of the framework “getting in your way.”&amp;#160; This is one of the many reasons behind the advent of &lt;a href="http://www.asp.net/mvc/" target="_blank"&gt;ASP.NET MVC&lt;/a&gt;.&amp;#160; Having just finished &lt;a href="http://www.amazon.com/gp/product/0470384611?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470384611"&gt;Professional ASP.NET MVC 1.0&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470384611" width="1" height="1" /&gt; from Wrox, I’m a convert. &lt;/p&gt;  &lt;h2&gt;The Book - Overview&lt;/h2&gt;  &lt;p&gt;First, the combo of authors on this book, Conery, Hanselman, Haack, and Guthrie, cannot be beat.&amp;#160; The &lt;a href="http://www.amazon.com/gp/product/0470384611?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470384611"&gt;book&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470384611" width="1" height="1" /&gt; starts out with the now famous &lt;a href="http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx" target="_blank"&gt;NerdDinner ASP.NET MVC Tutorial&lt;/a&gt; from ScottGu, but it’s so much more than that.&amp;#160; First off, the book is a very interesting read.&amp;#160; I’ve read countless programming books, some good, some bad, and some downright ugly.&amp;#160; This book stands out as one of the good ones.&amp;#160; This could just be the geek in me, but I found myself at times not wanting to put the book down.&amp;#160; That’s a good sign for a book on software development.&amp;#160; One of the things that I liked best was the “Product Team Aside” sections.&amp;#160; Being a developer, I’m interested in the thought process that has gone into building a framework like ASP.NET MVC.&amp;#160; I’ve read reviews on &lt;a href="http://www.amazon.com/gp/product/0470384611?ie=UTF8&amp;amp;amp;tag=visincblo-20&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1789&amp;amp;amp;creative=390957&amp;amp;amp;creativeASIN=0470384611" target="_blank"&gt;Amazon&lt;/a&gt;, where readers didn’t like that feature.&amp;#160; I don’t get it, but everyone is entitled to their own opinions.&amp;#160; Personally, I would read an entire book regarding the design decisions for something like ASP.NET MVC.&amp;#160; Before continuing, one more complaint that I’ve seen is that the book is “too beginner.”&amp;#160; This may be true if you’ve been using ASP.NET MVC full time for quite a while, but I felt that it had the right feel for someone coming from the Web Forms and starting down the ASP.NET MVC path.&amp;#160; The concepts were easy to grasp, and again it was an enjoyable read.&amp;#160; Overall I feel that the authors did a great job.&amp;#160; &lt;/p&gt;  &lt;h2&gt;The Chapters&lt;/h2&gt;  &lt;p&gt;Most of the chapters in the book are ones you would expect from one on ASP.NET MVC, they discuss topics such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;URL Routing &lt;/li&gt;    &lt;li&gt;Views &lt;/li&gt;    &lt;li&gt;Controllers &lt;/li&gt;    &lt;li&gt;Actions &lt;/li&gt;    &lt;li&gt;HTML Helpers &lt;/li&gt;    &lt;li&gt;Filters &lt;/li&gt;    &lt;li&gt;AJAX &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;A few of the chapters stood out however...&lt;/p&gt;  &lt;p&gt;Chapter 3 was very enjoyable and well written.&amp;#160; It goes over what’s in every Web Form developer’s mind, “Is ASP.NET MVC better than Web Forms.”&amp;#160; It tackled a lot of the concerns that a Web Form developer might have as well as the thoughts running through our minds.&amp;#160; I liked that there was an element of humor to the chapter and the book overall, for example on the topic of a Web Forms developer seeing MVC Views for the first time, “1999 called and they want their Classic ASP Spaghetti Code back!”&lt;/p&gt;  &lt;p&gt;Chapter 4 gets into the details of the framework with routes and URLs.&amp;#160; Right up front, it compares Routing to URL Rewriting, a question that I think lots of ASP.NET developers may have.&amp;#160; Note that Routing is available as part of ASP.NET 3.5 SP1 and isn’t specific to MVC, so even if you aren’t jumping over to MVC just yet, you may find URL Routing to be useful in your applications today.&amp;#160; The chapter then digs into Routing in detail.&amp;#160; There was even an example of using Routing with Web Forms as well, which I thought was a great addition.&lt;/p&gt;  &lt;p&gt;Chapter 9 discusses securing the MVC application.&amp;#160; I quite enjoyed the tone of the chapter.&amp;#160; The examples given were real-world problems and were very interesting.&amp;#160; Honestly, security is often a fairly boring topic, but in this book it’s presented in a way that’s very engaging.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;Chapter 11 really interested me.&amp;#160; It talks about testable design patterns, something that often is ignored in order to “get the job done.”&amp;#160; I found the chapter very useful coming from working on teams where testing is somewhat of an afterthought.&amp;#160; In an ideal world, we’d all have fully testable, maintainable code, and everything would just be “perfect,” but sadly in the real world, this often doesn’t translate.&amp;#160; The concepts presented in this chapter are practical practices that can easily be done in order to position your code for better quality in the long run, even if your team isn’t the testing type.&lt;/p&gt;  &lt;p&gt;Finally, Chapter 12 discusses using MVC and ASP.NET Web Forms together.&amp;#160; This chapter is extremely helpful if you are porting an existing application over to MVC.&amp;#160; I like the fact that the authors added an example of porting over a Web Forms application to MVC.&amp;#160; &lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;Coming from the Web Forms world, I would highly recommend &lt;a href="http://www.amazon.com/gp/product/0470384611?ie=UTF8&amp;amp;tag=visincblo-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0470384611"&gt;Professional ASP.NET MVC 1.0&lt;/a&gt;&lt;img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=visincblo-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0470384611" width="1" height="1" /&gt;.&amp;#160; If you are looking strictly for a reference book that will just sit on the shelf until you need parts of it, then this may not be for you. However, if you are looking for something to get you up to speed on ASP.NET MVC quickly, then I think you too will enjoy it. &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:0767317B-992E-4b12-91E0-4F059A8CECA8:f401ceaf-14d9-4ec1-8bdb-facaf4712626" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/MVC" rel="tag"&gt;MVC&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9kqtE6TrPNDmDHd-dK0vVxzKnmQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9kqtE6TrPNDmDHd-dK0vVxzKnmQ/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/9kqtE6TrPNDmDHd-dK0vVxzKnmQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9kqtE6TrPNDmDHd-dK0vVxzKnmQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=rFxqFyA8qH0:rYduxXzMb3w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=rFxqFyA8qH0:rYduxXzMb3w:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=rFxqFyA8qH0:rYduxXzMb3w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=rFxqFyA8qH0:rYduxXzMb3w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=rFxqFyA8qH0:rYduxXzMb3w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=rFxqFyA8qH0:rYduxXzMb3w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=rFxqFyA8qH0:rYduxXzMb3w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=rFxqFyA8qH0:rYduxXzMb3w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/rFxqFyA8qH0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/rFxqFyA8qH0/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/05/17/Book-Review-Wrox-Professional-ASP.NET-MVC-1.0.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=fab30360-f748-4f36-9928-844f965f8d99</guid>
      <pubDate>Sun, 17 May 2009 12:01:58 -0500</pubDate>
      <category>.NET</category>
      <category>ASP.NET</category>
      <category>MVC</category>
      <category>Review</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=fab30360-f748-4f36-9928-844f965f8d99</pingback:target>
      <slash:comments>5</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=fab30360-f748-4f36-9928-844f965f8d99</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/05/17/Book-Review-Wrox-Professional-ASP.NET-MVC-1.0.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=fab30360-f748-4f36-9928-844f965f8d99</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=fab30360-f748-4f36-9928-844f965f8d99</feedburner:origLink></item>
    <item>
      <title>ASP.NET 4.0 AJAX – Preview 4 – Client Templates</title>
      <description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 10px 5px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Gears" border="0" alt="Gears" align="left" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/image_11.png" width="244" height="163" /&gt;A little over a month ago, Microsoft released the fourth preview of ASP.NET 4.0 AJAX.&amp;#160; This is the new release of the Microsoft AJAX Framework that will be released with ASP.NET 4.0.&amp;#160; We’re getting closer to the RTM release of .NET 4.0 (hopefully later this year), so I figured this would be a good time to start posting about ASP.NET 4.0 AJAX.&amp;#160; There are some very exciting things coming along with ASP.NET 4.0, and the ASP.NET AJAX component is no exception.&amp;#160; The best news about ASP.NET AJAX is that you can start using it today without having to wait for the full blown ASP.NET AJAX framework.&amp;#160; Keep in mind that these components are still in &amp;quot;preview&amp;quot; mode (meaning no Microsoft support), though they are usable at your own risk.&amp;#160; For more information, you can check out the &lt;a href="http://aspnet.codeplex.com/license" target="_blank"&gt;license&lt;/a&gt; on CodePlex. &lt;/p&gt;  &lt;p&gt;In this post, I’ll be talking about the client templates that can be found in the latest release.&amp;#160; Client templates are very powerful.&amp;#160; They are a key component for rich client-side applications.&amp;#160; Up until now, I have been using &lt;a href="http://jtemplates.tpython.com/" target="_blank"&gt;jTemplates&lt;/a&gt;, a client template solution plugin for jQuery.&amp;#160; If you aren’t familiar with jTemplates, check out Dave Ward’s article “&lt;a href="http://encosia.com/2008/06/26/use-jquery-and-aspnet-ajax-to-build-a-client-side-repeater/"&gt;Use jQuery and ASP.NET AJAX to build a client side Repeater&lt;/a&gt;.”&amp;#160; jTemplates is really a nice plugin, but it’s a bit disconnected from the flow of the page.&amp;#160; Enter ASP.NET 4.0 AJAX and the DataView control. &lt;/p&gt;  &lt;h2&gt;Introducing the Sys.UI.DataView Control &lt;/h2&gt;  &lt;p&gt;The ASP.NET AJAX DataView (not to be confused with the ADO.NET DataView), is a new control that functions similar to a server-side repeater as you will see.&amp;#160; The first thing to note with the DataView is that this control operates without ASP.NET, meaning you can use this in any framework or even a straight HTML page.&amp;#160; This shouldn’t be too much of a surprise, since you can download the ASP.NET AJAX Library 3.5 as &lt;a href="http://www.asp.net/AJAX/downloads/" target="_blank"&gt;standalone scripts&lt;/a&gt; today.&amp;#160; Having said that, let’s start with an simple example that will just run in a standard HTML page.&amp;#160; For this first example, I will walk through declaratively setting up template binding.&amp;#160; Let’s get started…&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:fb3a1972-4489-4e52-abe7-25a00bb07fdf:bba71b46-15f9-4354-9d34-a8398be25305" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;Want to follow along with the examples? &lt;a href="http://blogs.visoftinc.com/file.axd?file=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/DataViewSamples_1.zip"&gt;Download Them - 88K&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;h3&gt;DataView and Declarative Binding&lt;/h3&gt;  &lt;p&gt;In order to use the Microsoft AJAX Templates, you need to first reference two scripts, MicrosoftAjax.js (or MicrosoftAjax.debug.js) and MicrosoftAjaxTemplates.js (or MicrosoftAjaxTemplates.debug.js).&amp;#160; These files can be found in the &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645" target="_blank"&gt;ASP.NET Ajax Preview 4.zip&lt;/a&gt; file from CodePlex.&amp;#160; These would be added to the head of your page. &lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt; &lt;span class="attr"&gt;type&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;scripts/MicrosoftAjax.debug.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;br /&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;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;src&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;scripts/MicrosoftAjaxTemplates.debug.js&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;script&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Next, we’ll move on to the body.&amp;#160; In the body tag, you need to specify a few namespaces and add a command, as shown in the snippet below.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre class="csharpcode"&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt; &lt;br /&gt;        &lt;span class="attr"&gt;xmlns:dataview&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;javascript:Sys.UI.DataView&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;sys:activate&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;   ...&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The first namespace being registered is “sys”.&amp;#160; This is needed for all the templates, whether you activate them declaratively or imperatively.&amp;#160;&amp;#160; The sys prefix points to the Microsoft AJAX Library’s Sys class.&amp;#160;&amp;#160; The next two attributes are needed for declarative activation/binding.&amp;#160; In the second xmlns attribute, we are registering the prefix “dataview.”&amp;#160; This namespace refers to the Sys.UI.DataView AJAX control.&amp;#160; The final attribute being added to the body tag is sys:activate.&amp;#160; The value for sys:activate can be “*” which means “activate anything on the page with sys:attach (which we will discuss shortly).”&amp;#160; Activating in this sense, means binding the templates when the page loads.&amp;#160; Note, that instead of using an asterisk for sys:activate, you could also have a comma-delimited list of the ids to bind on page load.&amp;#160; This is a better approach if you have a complex page since wildcards always seem to introduce some sort of delay.&lt;/p&gt;

&lt;p&gt;Now that we have the framework setup, let’s move on to the actual template using the DataView.&amp;#160; For this example, I will render an unordered list, but you can use any standard HTML markup that you want.&amp;#160; To keep this example simple, I will bind to a JavaScript array defined in page, but later will discuss binding to a service. &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nflList&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:data&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ nfcEast }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ Homepage }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{{ Team }}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Let’s take a closer look at what’s going on.&amp;#160; Starting with the UL element, you can see the typical id and class attributes.&amp;#160; You may think the class definition looks a bit peculiar, and you’d be correct.&amp;#160; The class &lt;strong&gt;sys-template&lt;/strong&gt; is used as a convention for hiding the template until binding occurs.&amp;#160; This class needs to be defined somewhere in your stylesheet.&amp;#160; &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre class="csharpcode"&gt;&lt;span class="cls"&gt;.sys-template&lt;/span&gt; { &lt;span class="kwrd"&gt;display&lt;/span&gt;:&lt;span class="str"&gt;none;&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Remember, you can always define multiple classes on an element by space-delimiting them.&amp;#160; For example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;=”&lt;span class="attr"&gt;myClass&lt;/span&gt; &lt;span class="attr"&gt;sys-template&lt;/span&gt;” ...&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Next, we have our sys:attach, which I briefly mentioned earlier.&amp;#160; This property assigns the DataView&amp;#160; to this element.&amp;#160; This is equal to you manually wiring up the template using the &lt;a href="http://msdn.microsoft.com/en-us/library/bb397487.aspx" target="_blank"&gt;$create shortcut&lt;/a&gt; (which will be discussed in the DataView and Imperative Binding section).&amp;#160; The sys:attach value is a reference to the namespace of dataview that we defined on the body element earlier.&lt;/p&gt;

&lt;p&gt;The final attribute is dataview:data.&amp;#160; As you may have guessed, this is a reference to the data source we need to bind to, and remember in this example I’m just binding to a JavaScript array.&amp;#160; Note, the array name is wrapped in double curly-braces {{ nfcEast }}.&amp;#160; I’m missing football season (Go Giants), so I decided to go with an NFL theme for the sample data, as you can see.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; nfcEast = [&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;New York Giants&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.giants.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Philadelphia Eagles&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.philadelphiaeagles.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Dallas Cowboys&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.dallascowboys.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;    { Team: &lt;span class="str"&gt;&amp;quot;Washington Redskins&amp;quot;&lt;/span&gt;, Homepage: &lt;span class="str"&gt;&amp;quot;http://www.redskins.com/&amp;quot;&lt;/span&gt; }&lt;br /&gt;]&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Now on to the template itself.&amp;#160; This is where we set up the binding of the properties.&amp;#160; The {{ ... }} blocks designate one-way / one-time binding.&amp;#160; This syntax is very similar to the server side Eval() statements that we use when binding in ASP.NET.&amp;#160; When this is bound, the DataView acts like a repeater and creates a new &amp;lt;li&amp;gt;&amp;lt;/li&amp;gt; for each row of data.&amp;#160; You can see the rendered HTML in Figure 1.&amp;#160; The output is shown in Figure 2.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 1: The Rendered HTML After Binding (From FireBug)" border="0" alt="Figure 1: The Rendered HTML After Binding (From FireBug)" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/image10.png" width="485" height="181" /&gt; 

  &lt;br /&gt;&lt;strong&gt;Figure 1: The Rendered HTML After Binding (From FireBug)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;br /&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 2: The Output" border="0" alt="Figure 2: The Output" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/image14.png" width="262" height="130" /&gt;&amp;#160; &lt;br /&gt;&lt;strong&gt;Figure 2: The Output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;DataView and Imperative Binding&lt;/h3&gt;

&lt;p&gt;In the last example, I showed how you can use declarative binding and the DataView control.&amp;#160; Let’s now look at how the code looks if we decide to wire things up ourselves.&amp;#160; I will keep everything the same as the last example so that you can clearly see the differences.&lt;/p&gt;

&lt;p&gt;First, let’s review the changes to the HTML code:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&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;=&amp;quot;javascript:Sys&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nflList&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ Homepage }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{{ Team }}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;li&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ul&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;body&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;You’ll notice that body only has a namespace declaration for sys and the &amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt; now just has an id and class. &lt;/p&gt;

&lt;p&gt;Now for the JavaScript to do the binding:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;Sys.Application.add_init(appInit);&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; appInit() {&lt;br /&gt;    $create(&lt;br /&gt;        Sys.UI.DataView,&lt;br /&gt;        { data: nfcEast },&lt;br /&gt;        &lt;span class="kwrd"&gt;null&lt;/span&gt;,&lt;br /&gt;        &lt;span class="kwrd"&gt;null&lt;/span&gt;,&lt;br /&gt;        $get(&lt;span class="str"&gt;&amp;quot;nflList&amp;quot;&lt;/span&gt;)&lt;br /&gt;        );&lt;br /&gt;} &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Not too much here, and it’s standard code ASP.NET AJAX is today.&amp;#160; First, we are wiring up a handler (the appInit function) for the application init event.&amp;#160; This init event is raised after all scripts have been loaded, but before objects are created.&amp;#160; In the appInit function, we are simply manually wiring up the Sys.UI.DataView control as we would do with an ASP.NET AJAX control in the current ASP.NET AJAX library.&amp;#160; The $create method takes five parameters, the signature is &lt;a href="http://msdn.microsoft.com/en-us/library/bb397487.aspx" target="_blank"&gt;$create&lt;/a&gt;(Type type, properties, events, references, element).&amp;#160; For the parameters, we start by passing the Sys.UI.DataView for the type.&amp;#160; Next, we have an object literal of the property and the value, in this case we are setting the data property with our array.&amp;#160; There are no events or references needed, so those values are simply null.&amp;#160; Finally, we need to pass the element using the &lt;a href="http://msdn.microsoft.com/en-us/library/bb397717.aspx" target="_blank"&gt;$get shortcut&lt;/a&gt; (which does a document.getElementById under the covers).&lt;/p&gt;

&lt;p&gt;Running this code is identical to the declarative method, in that on the application initialization, the template is filled with data.&lt;/p&gt;

&lt;p&gt;One other useful function is replacing the data in your template.&amp;#160; This can simply be done using the syntax:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;$find(&lt;span class="str"&gt;&amp;quot;ID OF THE ELEMENT&amp;quot;&lt;/span&gt;).set_data(THE JSON DATA);.&lt;/pre&gt;
&lt;/div&gt;

&lt;h2&gt;Binding the DataView to a WCF REST Service&lt;/h2&gt;

&lt;p&gt;As promised earlier, let’s walk through binding a DataView client-template to a WCF Service.&amp;#160; The DataView can bind to any &lt;a href="http://www.json.org/" target="_blank"&gt;JSON&lt;/a&gt; serialized object.&amp;#160;&amp;#160; For this particular example, I will use a REST WCF service hosted in an ASP.NET Website.&amp;#160;&amp;#160; If you are not familiar with WCF and REST services, have a look at &lt;a href="http://blogs.conchango.com/anthonysteele/archive/2008/03/15/rest-from-wcf-3-5.aspx" target="_blank"&gt;this&lt;/a&gt; or &lt;a href="http://www.code-magazine.com/Article.aspx?quickid=080014" target="_blank"&gt;this&lt;/a&gt; article.&amp;#160; First, let’s take a look at the service itself.&lt;/p&gt;

&lt;p&gt;In the .svc file, I’ve declared the ServiceHost:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="asp"&gt;&amp;lt;%@ ServiceHost Language=&amp;quot;C#&amp;quot; &lt;br /&gt;    Service=&amp;quot;SampleService&amp;quot;&lt;br /&gt;    CodeBehind=&amp;quot;~/App_Code/SampleService.svc.cs&amp;quot;&lt;br /&gt;    Factory=&amp;quot;System.ServiceModel.Activation.WebServiceHostFactory&amp;quot; %&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The Factory declaration there is to eliminate the need of configuring the service in the web.config.&amp;#160; The &lt;a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.activation.webservicehostfactory.aspx" target="_blank"&gt;WebServiceHostFactory&lt;/a&gt; automatically uses the WebHttpBinding and WebHttpBehavior.&amp;#160; Now for the code…&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;div id="codeSnippetWrapper"&gt;
    &lt;pre id="codeSnippet" class="csharpcode"&gt;[ServiceContract(Namespace = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;)]&lt;br /&gt;[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SampleService&lt;br /&gt;{&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; SampleService() {}&lt;br /&gt;&lt;br /&gt;    [DataContract]&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; NFLTeam&lt;br /&gt;    {&lt;br /&gt;        [DataMember]&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Team { get; set; }&lt;br /&gt;        [DataMember]&lt;br /&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; Homepage { get; set; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [OperationContract]&lt;br /&gt;    [WebGet(UriTemplate = &lt;span class="str"&gt;&amp;quot;getTeams&amp;quot;&lt;/span&gt;,&lt;br /&gt;     ResponseFormat = WebMessageFormat.Json)]&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;NFLTeam&amp;gt; GetTeams()&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;NFLTeam&amp;gt; { &lt;br /&gt;        &lt;span class="kwrd"&gt;new&lt;/span&gt; NFLTeam { Team = &lt;span class="str"&gt;&amp;quot;New York Giants&amp;quot;&lt;/span&gt;, Homepage = &lt;span class="str"&gt;&amp;quot;http://www.giants.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;        &lt;span class="kwrd"&gt;new&lt;/span&gt; NFLTeam { Team = &lt;span class="str"&gt;&amp;quot;Philadelphia Eagles&amp;quot;&lt;/span&gt;, Homepage = &lt;span class="str"&gt;&amp;quot;http://www.philadelphiaeagles.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;        &lt;span class="kwrd"&gt;new&lt;/span&gt; NFLTeam { Team = &lt;span class="str"&gt;&amp;quot;Dallas Cowboys&amp;quot;&lt;/span&gt;, Homepage = &lt;span class="str"&gt;&amp;quot;http://www.dallascowboys.com/&amp;quot;&lt;/span&gt; },&lt;br /&gt;        &lt;span class="kwrd"&gt;new&lt;/span&gt; NFLTeam { Team = &lt;span class="str"&gt;&amp;quot;Washington Redskins&amp;quot;&lt;/span&gt;, Homepage = &lt;span class="str"&gt;&amp;quot;http://www.redskins.com/&amp;quot;&lt;/span&gt; }        &lt;br /&gt;        };&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Nothing really out of the ordinary going on in the code.&amp;#160; I’m simply returning a generic list of objects for this example so that you don’t need a database or anything to run the samples if you download them.&amp;#160; One thing to note if you are not familiar with REST services in WCF, the WebGet attribute specifies that if we are using a WebHttpBinding, this method can be called using the GET verb.&amp;#160; As parameters, I have set the UriTemplate to be getTeams, this means that the URL to access the service will be ../SampleService.svc/getTeams.&amp;#160; Finally, since the DataView binds to &lt;a href="http://json.org/" target="_blank"&gt;JSON&lt;/a&gt; objects, the ResponseFormat property specifies the result should be serialized as &lt;a href="http://www.json.org/example.html" target="_blank"&gt;JSON&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now with our service in tack, we can work on the DataView code.&amp;#160; Again, in this example I will show the setup in a simple HTML page, illustrating how the Microsoft ASP.NET AJAX 4.0 Library can be used without ASP.NET.&amp;#160; I will skip the script and body declarations since I showed them in the previous examples.&amp;#160; For this DataView, I will use an HTML TABLE and bind declaratively.&amp;#160; &lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tbody&lt;/span&gt; &lt;span class="attr"&gt;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;nflListBody&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt; &lt;br /&gt;        &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;        &lt;span class="attr"&gt;dataview:autofetch&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;dataview:httpverb&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;dataview:dataprovider&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SampleService.svc&amp;quot;&lt;/span&gt;&lt;br /&gt;        &lt;span class="attr"&gt;dataview:fetchoperation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;getTeams&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{{ Team }}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt; &lt;span class="attr"&gt;href&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ Homepage }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;{{ Homepage }}&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;a&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;td&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tr&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;tbody&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;table&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;  &lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;A few of the attributes required for the DataView should look familiar, the id, class, and the sys:attach.&amp;#160; Let’s take a closer look at the rest.&lt;/p&gt;

&lt;table border="1" cellspacing="0" cellpadding="2" width="494"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td valign="top" width="166"&gt;&lt;span class="attr"&gt;dataview:autofetch&lt;/span&gt;&lt;/td&gt;

      &lt;td valign="top" width="326"&gt;Indicates if the data should be retrieved immediately from a data source when the page loads.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="172"&gt;&lt;span class="attr"&gt;dataview:httpverb&lt;/span&gt;&lt;/td&gt;

      &lt;td valign="top" width="321"&gt;A string indicating the the HTTP method.&amp;#160; The default method is POST, but in my case, the REST service is using GET.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="177"&gt;&lt;span class="attr"&gt;dataview:dataprovider&lt;/span&gt;&lt;/td&gt;

      &lt;td valign="top" width="317"&gt;The data provider the DataView should use to get the data.&amp;#160; This is a path to the svc file.&amp;#160; In my example, the service is in the root with the sample page.&lt;/td&gt;
    &lt;/tr&gt;

    &lt;tr&gt;
      &lt;td valign="top" width="181"&gt;&lt;span class="attr"&gt;dataview:fetchoperation&lt;/span&gt;&lt;/td&gt;

      &lt;td valign="top" width="314"&gt;The querystring or method name to use to retrieve the data.&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;The DataView template itself should look familiar.&amp;#160; Again I am using one-way, one-time bindings.&amp;#160; Really the only difference is where the template is defined for the table.&amp;#160; The DataView element for a table should be defined on the &amp;lt;tbody&amp;gt; so that the repeating works correctly, otherwise if you add it to the table and just have a structure without the tbody like &amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;...&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;, you’ll get incorrect output as shown in Figure 3.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Figure 3: Incorrect output if you put the DataView on the TABLE Element" border="0" alt="Figure 3: Incorrect output if you put the DataView on the TABLE Element" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/image_6.png" width="615" height="143" /&gt; 

  &lt;br /&gt;&lt;strong&gt;Figure 3: Incorrect output if you put the DataView on the TABLE Element&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;Passing Parameters Using the DataView and REST&lt;/h2&gt;

&lt;p&gt;One final note on using REST services with the DataView.&amp;#160; During the course of my testing, I ran across a problem when trying to pass parameters to a REST service.&amp;#160; In the last example, I didn’t pass any parameters to the method being called by the DataView, but if you were going to pass parameters, you would typically use the fetchParameters property for example:&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;list sys-template&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:autofetch&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:httpverb&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:dataprovider&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SampleService.svc&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:fetchoperation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;getGreeting&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:fetchparameters&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;{{ {greeting: 'Hello World'} }}&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;{{ Text }}&lt;br /&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;/div&gt;

&lt;p&gt;When the DataView goes out and makes the request using the fetchparamerters, it ends up being: /SampleService.svc/getGreeting&lt;strong&gt;?greeting=Hello%20World&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The proper syntax for the REST service should be /SampleService.svc/getGreeting&lt;strong&gt;/Hello%20World&lt;/strong&gt;.&lt;strong&gt;&amp;#160; &lt;/strong&gt;In order to get the proper syntax for REST service, you should append the parameters as part of the fetchoperation.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre id="codeSnippet" 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;id&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;greeting&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;class&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;sys-template&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;sys:attach&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;dataview&amp;quot;&lt;/span&gt; &lt;br /&gt;    &lt;span class="attr"&gt;dataview:autofetch&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:httpverb&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span class="attr"&gt;dataview:dataprovider&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;SampleService.svc&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;strong&gt;&lt;span class="attr"&gt;dataview:fetchoperation&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;getGreeting/Hello World&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    {{ Text }}&lt;br /&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;
Notice the fetchopertion in that example, appending the parameters to the end gives us the correct format. 

  &lt;br /&gt;&lt;/div&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this introduction to the DataView and ASP.NET 4.0 AJAX.&amp;#160; If you’ve been inspired to find out more about the DataView and the other features found in ASP.NET 4.0 AJAX, be sure to check out the samples and documentation found on &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24645" target="_blank"&gt;Codeplex&lt;/a&gt;.&amp;#160; &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:fb3a1972-4489-4e52-abe7-25a00bb07fdf:15230aad-812d-4386-89d0-6fb61c163722" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;Looking to try the code in this post out for yourself?  &lt;a href="http://blogs.visoftinc.com/file.axd?file=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/DataViewSamples_1.zip"&gt;Download the Samples - 88K&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:47a7c14e-e837-44fd-9ce5-0983da6f9313" class="wlWriterEditableSmartContent"&gt;&lt;p&gt; &lt;a href="http://blogs.visoftinc.com/file.axd?file=WindowsLiveWriter/ASP.NETAJAX4.0Preview4ClientTemplates_13796/DataViewSamples.zip" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&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:0767317B-992E-4b12-91E0-4F059A8CECA8:c7a46742-0f2f-4813-a48c-ea6d3614c1a9" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX" rel="tag"&gt;AJAX&lt;/a&gt;,&lt;a href="http://technorati.com/tags/WCF" rel="tag"&gt;WCF&lt;/a&gt;,&lt;a href="http://technorati.com/tags/REST" rel="tag"&gt;REST&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/R1GK6FEEc9LWDOKwrWynACsCJTs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R1GK6FEEc9LWDOKwrWynACsCJTs/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/R1GK6FEEc9LWDOKwrWynACsCJTs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R1GK6FEEc9LWDOKwrWynACsCJTs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kc6gvGg4kBY:9sXUBklrnmY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kc6gvGg4kBY:9sXUBklrnmY:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kc6gvGg4kBY:9sXUBklrnmY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kc6gvGg4kBY:9sXUBklrnmY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kc6gvGg4kBY:9sXUBklrnmY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kc6gvGg4kBY:9sXUBklrnmY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=kc6gvGg4kBY:9sXUBklrnmY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=kc6gvGg4kBY:9sXUBklrnmY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/kc6gvGg4kBY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/kc6gvGg4kBY/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=b2e242d3-7abc-4b74-a00b-d1c0341244dc</guid>
      <pubDate>Tue, 28 Apr 2009 00:21:39 -0500</pubDate>
      <category>AJAX</category>
      <category>ASP.NET</category>
      <category>JavaScript</category>
      <category>WCF</category>
      <category>REST</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=b2e242d3-7abc-4b74-a00b-d1c0341244dc</pingback:target>
      <slash:comments>16</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=b2e242d3-7abc-4b74-a00b-d1c0341244dc</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/04/28/ASP.NET-4.0-AJAX-Preview-4-Client-Templates.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=b2e242d3-7abc-4b74-a00b-d1c0341244dc</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=b2e242d3-7abc-4b74-a00b-d1c0341244dc</feedburner:origLink></item>
    <item>
      <title>SQL Express 2008 x64 Integration with Visual Studio 2008 SP1</title>
      <description>&lt;p&gt;Yesterday I was trying to add a database to the App_Data folder of a simple web application I was creating.&amp;nbsp; During one of my computer re-installs, I didn't install SQL Express since I normally use a full blown SQL instance, so I really had no need for it.&amp;nbsp; Now that I did need it, I wanted to run SQL Express 2008.&amp;nbsp; I am running Windows Vista x64, so I proceeded to download SQL Express 2008 x64.&amp;nbsp; I installed it and loaded up SQL Server Management Studio to make sure the instance was working (I just used the default of SQLEXPRESS for the instance name).&amp;nbsp; Everything was fine.&amp;nbsp; I then fired up Visual Studio, right-clicked on the App_Data folder of the web app, and... error (Figure 1).&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/Requires%20SQL%202005_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="Visual Studio Requires SQL 2005" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/Requires%20SQL%202005_thumb.jpg" width="500" height="201"&gt;&lt;/a&gt;&lt;br&gt;&lt;strong&gt;Figure 1 - Connections to SQL require SQL Express &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;h2&gt;The Fix - Option 1 - Use SQL Express 2008 x86&lt;/h2&gt; &lt;p&gt;One quick fix for this problem is to install the 32-bit version of SQL 2008 Express instead of the x64 version.&amp;nbsp; I figured this was sort of silly, I'm running Windows x64 and I really hate installing 32-bit software if I don't have to.&amp;nbsp; But if you're looking for a simple solution without an extra download, this is it.&lt;/p&gt; &lt;h2&gt;The Fix - Option 2 - Using SQL Express 2008 x64&lt;/h2&gt; &lt;p&gt;Refusing to take the easy way out, I then started down the path of fixing this "the right way".&amp;nbsp; The first article I came across was &lt;a href="http://predicatet.blogspot.com/2007/01/connections-to-sql-server-files-mdf.html" target="_blank"&gt;John Roland's&lt;/a&gt; post on this error.&amp;nbsp; Not helpful in my case, but useful if your instance is named something other than the default for SQLEXPRESS.&amp;nbsp; &lt;/p&gt; &lt;p&gt;Next, I found someone else with my problem on the &lt;a href="http://forums.asp.net/t/1371782.aspx" target="_blank"&gt;ASP.NET Forums&lt;/a&gt;.&amp;nbsp; Thankfully, it had a link to the fix (&lt;a href="http://support.microsoft.com/default.aspx/kb/957944" target="_blank"&gt;KB 957944&lt;/a&gt;).&amp;nbsp; However this isn't a something you can just directly download from the KB article since it isn't available to the general public just yet. After a quick Google search, I found a simple way to &lt;a href="http://blog.tiensivu.com/aaron/archives/1746-Requesting-MS-hotfixes-online-has-changed-slightly-new-way-of-generating-a-request.html" target="_blank"&gt;request the hotfix&lt;/a&gt; from Microsoft.&amp;nbsp; From there, I discovered a pretty cool site called &lt;a href="http://blog.tiensivu.com/aaron/archives/1746-Requesting-MS-hotfixes-online-has-changed-slightly-new-way-of-generating-a-request.html" target="_blank"&gt;Hotfixr&lt;/a&gt;, which automatically sends the correct request to Microsoft.&amp;nbsp; If you are looking for the specific one for this problem, you can use this &lt;a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=957944" target="_blank"&gt;direct link&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;After you make a request, Microsoft will e-mail you a link to the fix as well as a password to unzip the fix.&amp;nbsp; After downloading it, I installed the fix as show in Figure 2 below.&amp;nbsp; Note this install took quite a while.&amp;nbsp; Make sure you have all your instances for VS closed.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/Installing%20KB957944_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="Installing KB957944" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/Installing%20KB957944_thumb.jpg" width="517" height="482"&gt;&lt;/a&gt; &lt;br&gt;&lt;strong&gt;Figure 2 - Installing the KB 957944 Hotfix&lt;/strong&gt;&lt;/p&gt; &lt;h2&gt;Configuring SQL&lt;/h2&gt; &lt;p&gt;I then fired up Visual Studio 2008, attempted to add a database again, but I received another error.&amp;nbsp; This was a pretty simple one though, it just stated that Named Pipes wasn't enabled for the server.&amp;nbsp; D'oh forgot to do that.&amp;nbsp; Easy fix...&amp;nbsp; Go to the SQL Server Configuration Manger, click on the Protocols for the specific instance and enable Named Pipes (Figure 3).&amp;nbsp;&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/SQL%20Protocols_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="SQL Protocols" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/SQL%20Protocols_thumb.jpg" width="354" height="172"&gt;&lt;/a&gt; &lt;br&gt;&lt;strong&gt;Figure 3 - Enable Named Pipes&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;After all of that, a database can successfully be added (Figure 4).&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/New%20Database_2.jpg"&gt;&lt;img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="New Database" src="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/VisualStudio2008SP1andSQLExpress2008x64_7E2E/New%20Database_thumb.jpg" width="175" height="85"&gt;&lt;/a&gt; &lt;br&gt;&lt;strong&gt;Figure 4 - Fixed... A New Database in App_Data&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4fa06e46-91b0-42e2-87c5-069a10610203" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/SQL%202008%20Express" rel="tag"&gt;SQL 2008 Express&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Visual%20Studio%202008" rel="tag"&gt;Visual Studio 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/x64" rel="tag"&gt;x64&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/k0KMez98QC37UdIxWthGkBfbcq0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k0KMez98QC37UdIxWthGkBfbcq0/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/k0KMez98QC37UdIxWthGkBfbcq0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/k0KMez98QC37UdIxWthGkBfbcq0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=gEfA-HzX_nM:uTcQPK4DS6w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=gEfA-HzX_nM:uTcQPK4DS6w:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=gEfA-HzX_nM:uTcQPK4DS6w:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=gEfA-HzX_nM:uTcQPK4DS6w:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=gEfA-HzX_nM:uTcQPK4DS6w:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=gEfA-HzX_nM:uTcQPK4DS6w:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=gEfA-HzX_nM:uTcQPK4DS6w:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=gEfA-HzX_nM:uTcQPK4DS6w:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/gEfA-HzX_nM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/gEfA-HzX_nM/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/02/06/SQL-Express-2008-x64-Integration-with-Visual-Studio-2008-SP1.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=04d73728-cc60-4061-a18c-2e0d409a7363</guid>
      <pubDate>Fri, 06 Feb 2009 20:18:14 -0500</pubDate>
      <category>How To</category>
      <category>SQL</category>
      <category>Visual Studio</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=04d73728-cc60-4061-a18c-2e0d409a7363</pingback:target>
      <slash:comments>22</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=04d73728-cc60-4061-a18c-2e0d409a7363</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/02/06/SQL-Express-2008-x64-Integration-with-Visual-Studio-2008-SP1.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=04d73728-cc60-4061-a18c-2e0d409a7363</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=04d73728-cc60-4061-a18c-2e0d409a7363</feedburner:origLink></item>
    <item>
      <title>My Wrox Blox Books - Now on Amazon!</title>
      <description>&lt;p&gt;I just happen to be browsing Amazon today and noticed that my Wrox Blox books are available for purchase on Amazon.com.&amp;nbsp; Pretty cool stuff!&amp;nbsp; They were listed up there before, but weren't available directly through Amazon until now.&amp;nbsp; For a full description and the table of contents of each, just click on the Amazon links at the bottom of this post.&amp;nbsp; In addition, here are my previous announcements:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2008/01/11/wrox-blox-hands-on-asp.net-ajax-control-toolkit.aspx"&gt;Hands-on ASP.NET AJAX Control Toolkit&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2008/04/28/Wrox-Blox-ASP.NET-AJAX-Control-Development-with-Visual-Studio-2008-and-.NET-3.5-Framework.aspx"&gt;ASP.NET AJAX Control Development...&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Both books are good guides for anyone using ASP.NET AJAX in either Visual Studio 2005 or 2008 using .NET 2.0 (with the AJAX Extensions) or .NET 3.5. &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;iframe style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=visincblo-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B001I1FFQO&amp;amp;md=10FE9736YVPPT7A0FBG2&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=FFFFFF&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&amp;amp;nou=1" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;iframe style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=visincblo-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B001I1FFQY&amp;amp;md=10FE9736YVPPT7A0FBG2&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=FFFFFF&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&amp;amp;nou=1" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&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:0767317B-992E-4b12-91E0-4F059A8CECA8:30aebce7-f2c4-47d7-8838-051b7d0ab3c9" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX" rel="tag"&gt;AJAX&lt;/a&gt;,&lt;a href="http://technorati.com/tags/AJAX%20Control%20Toolkit" rel="tag"&gt;AJAX Control Toolkit&lt;/a&gt;,&lt;a href="http://technorati.com/tags/.NET%203.5" rel="tag"&gt;.NET 3.5&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9jI0LCLz4Q68u0uAS-foVJJr100/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jI0LCLz4Q68u0uAS-foVJJr100/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/9jI0LCLz4Q68u0uAS-foVJJr100/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9jI0LCLz4Q68u0uAS-foVJJr100/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=3Z8xi9C5o_g:R-Pwf2VkCV8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=3Z8xi9C5o_g:R-Pwf2VkCV8:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=3Z8xi9C5o_g:R-Pwf2VkCV8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=3Z8xi9C5o_g:R-Pwf2VkCV8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=3Z8xi9C5o_g:R-Pwf2VkCV8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=3Z8xi9C5o_g:R-Pwf2VkCV8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=3Z8xi9C5o_g:R-Pwf2VkCV8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=3Z8xi9C5o_g:R-Pwf2VkCV8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/3Z8xi9C5o_g" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/3Z8xi9C5o_g/post.aspx</link>
      <author>Damien White</author>
      <comments>http://blogs.visoftinc.com/archive/2009/01/30/My-Wrox-Blox-Books-Now-on-Amazon!.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=2ff2edf0-aa9c-4dd3-9856-a693b87375f8</guid>
      <pubDate>Fri, 30 Jan 2009 10:00:23 -0500</pubDate>
      <category>.NET</category>
      <category>AJAX</category>
      <category>AJAX Control Toolkit</category>
      <category>ASP.NET</category>
      <category>News</category>
      <dc:publisher>Damien White</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=2ff2edf0-aa9c-4dd3-9856-a693b87375f8</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=2ff2edf0-aa9c-4dd3-9856-a693b87375f8</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/01/30/My-Wrox-Blox-Books-Now-on-Amazon!.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=2ff2edf0-aa9c-4dd3-9856-a693b87375f8</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=2ff2edf0-aa9c-4dd3-9856-a693b87375f8</feedburner:origLink></item>
    <item>
      <title>How To: Install Windows 7 on VirtualBox 2.1 – Fix Sound, Video and Network adapter</title>
      <description>&lt;p&gt;On my previous blog posts, I covered the installation of VirtualBox 2.1 and I went over the step-by-steps to create a virtual machine to host Windows 7.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-VirtualBox-2.1-Installation-Guide.aspx"&gt;How to: VirtualBox 2.1 Installation Guide&lt;/a&gt;  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-Install-Windows-7-on-VirtualBox-2.1-Create-a-virtual-machine.aspx"&gt;How To: Install Windows 7 on VirtualBox 2.1 - Create a virtual machine&lt;/a&gt;  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-Install-Windows-7-on-VirtualBox-2.1-e28093-Installation-details.aspx"&gt;How To: Install Windows 7 on VirtualBox 2.1 – Installation details&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I will now go over the details of fixing the sound, video and network adapter.&amp;nbsp; &lt;/p&gt; &lt;p&gt;If you go to Start &amp;gt; Right-click on My Computer &amp;gt; Manage (or run mmc), then you will get the content management window. You should notice that two devices are not properly installed (Base System Device, Ethernet Controller).&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_4.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_1.png" width="244" height="200"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;h4&gt;Mount Guest Additions &lt;/h4&gt; &lt;ol&gt; &lt;li&gt;On the VirtualBox machine window, in the menu bar: &lt;br&gt;Click Devices &amp;gt; Install Guest Additions… &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_6.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_2.png" width="241" height="244"&gt;&lt;/a&gt;  &lt;li&gt;The AutoPlay window should open to prompt you to run or open. &lt;br&gt;Click on Open/View files to specify yourself what to run. You can access using windows explorer the D drive. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_8.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_3.png" width="244" height="150"&gt;&lt;/a&gt;  &lt;li&gt;Right-click the VBoxWindowsAdditions file and choose properties.  &lt;li&gt;In the Properties window, go to the Compatibility tab. Check the Run this program in compatibility mode for box, and choose Windows Vista in the box below it. &lt;br&gt;You can check if you want “Run the program as an administrator”. &lt;br&gt;Click OK. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_10.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_4.png" width="199" height="244"&gt;&lt;/a&gt;  &lt;li&gt;Double-click the VBoxWindowsAdditions file to run it as an administrator. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_12.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_5.png" width="244" height="141"&gt;&lt;/a&gt; &lt;br&gt;Click Yes.  &lt;li&gt;If you have nothing happening, make sure to maximize the VirtualBox Guest Additions 2.1.0 Setup window. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_14.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_6.png" width="244" height="72"&gt;&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt; &lt;h4&gt;Guest Additions Installation Wizard&lt;/h4&gt; &lt;ol&gt; &lt;li&gt;Start the set up. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_16.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_7.png" width="244" height="190"&gt;&lt;/a&gt; &lt;br&gt;Click Next.  &lt;li&gt;License Agreement. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_18.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_8.png" width="244" height="189"&gt;&lt;/a&gt; &lt;br&gt;Click I Agree.  &lt;li&gt;Install Location. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_20.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_9.png" width="244" height="190"&gt;&lt;/a&gt; &lt;br&gt;Click Install.  &lt;li&gt;Installation starts. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_24.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_11.png" width="244" height="188"&gt;&lt;/a&gt;  &lt;li&gt;After a few seconds, you’ll be asked if you want to install the Sun display drivers. Select the check box to trust software from “Sun Microsystems, Inc.”. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_22.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_10.png" width="244" height="115"&gt;&lt;/a&gt; &lt;br&gt;Click Install.  &lt;li&gt;Once the installation is finished, your computer must be restarted in order to complete the installation. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_26.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_12.png" width="244" height="188"&gt;&lt;/a&gt; &lt;br&gt;Click on Reboot now and Finish.  &lt;li&gt;You should now be able to use your Virtual Machine in Full Screen mode (Right Ctrl + F).&amp;nbsp; &lt;/li&gt;&lt;/ol&gt; &lt;h4&gt;Install Network and Sound devices&lt;/h4&gt; &lt;ol&gt; &lt;li&gt;Click on Start &amp;gt; Shutdown &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_30.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_14.png" width="244" height="199"&gt;&lt;/a&gt;  &lt;li&gt;On the VirtualBox Manager window, right-click on the virtual machine &amp;gt; Settings. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_32.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_15.png" width="244" height="162"&gt;&lt;/a&gt;  &lt;li&gt;On the Settings window, click on Network. &lt;br&gt;Change the Adapter Type from PCnet-FAST III to &lt;strong&gt;Intel PRO/1000 MT Desktop (82540EM) &lt;/strong&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_36.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_17.png" width="244" height="222"&gt;&lt;/a&gt;  &lt;li&gt;On the Settings window, click on Audio. &lt;br&gt;Check Enable Audio. &lt;br&gt;In Host Audio Driver, change from “Null Audio Driver” to “Windows DirectSound” (you may have something else there) &lt;br&gt;In Audio Controller, select ICH AC97 or any other controller available.&lt;strong&gt;&amp;nbsp; &lt;br&gt;&lt;/strong&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_42.png"&gt;&lt;strong&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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_20.png" width="244" height="221"&gt;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;br&gt;&lt;/strong&gt;Click OK.  &lt;li&gt;Start your virtual machine with Window 7.  &lt;li&gt;You should see a pop-up showing that Windows 7 has found some hardware and has installed the drivers. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_44.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_21.png" width="244" height="71"&gt;&lt;/a&gt;&amp;nbsp; &lt;br&gt;&lt;strong&gt;Make sure to install the audio drivers&lt;/strong&gt; &lt;br&gt;Make sure to go to My Computer &amp;gt; Right-click on Manage &amp;gt; Systems Tools &amp;gt; Device Manager. &lt;br&gt;Under Sound, video and graphic, right-click on the Multimedia Audio Controller &amp;gt; Properties. &lt;br&gt;Go on the Driver tab and &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_50.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_23.png" width="220" height="244"&gt;&lt;/a&gt; &lt;br&gt;Click Update Driver… &lt;br&gt;Select Search automatically for updated driver software &lt;br&gt;The system should start installing driver software… &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_38.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_16.png" width="244" height="86"&gt;&lt;/a&gt; &lt;br&gt;You should now have your sound installed. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_40.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_18.png" width="244" height="179"&gt;&lt;/a&gt; &lt;br&gt;Click Close. &lt;br&gt;In your device manager window, you should see listed your audio controller. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_48.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_19.png" width="244" height="31"&gt;&lt;/a&gt; &lt;br&gt;&lt;strong&gt;Reboot&lt;/strong&gt; your virtual machine to complete installation.  &lt;li&gt;&lt;strong&gt;You are now done installing Windows 7. 7 for 7.&lt;/strong&gt;  &lt;li&gt;You can open your internet explorer 8 Beta and have fun with it. &lt;strong&gt;8 for 8. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_46.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToIns.1FixSoundVideoandNetworkadapter_E2B9/image_thumb_22.png" width="244" height="197"&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt; &lt;h4&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/h4&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Windows 7 Beta expires August 2009.&lt;/strong&gt;  &lt;li&gt;&lt;strong&gt;Activate&lt;/strong&gt; Windows if you want to use it &lt;strong&gt;more than 30 days&lt;/strong&gt;. You can run the activation process by searching for 'Activate Windows' on the Start Menu. &lt;/li&gt;&lt;/ul&gt; &lt;h4&gt;See Also&lt;/h4&gt; &lt;ul&gt; &lt;li&gt;I found a nice article that also covers this topic. &lt;br&gt;&lt;a title="http://www.knowliz.com/2009/01/install-windows-7-with-ubuntu-using.html" href="http://www.knowliz.com/2009/01/install-windows-7-with-ubuntu-using.html"&gt;http://www.knowliz.com/2009/01/install-windows-7-with-ubuntu-using.html&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0f56a23f-1455-4b97-b079-7a028485cd75" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/VirtualBox" rel="tag"&gt;VirtualBox&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows%207" rel="tag"&gt;Windows 7&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/W97CAVxV6KbvVDLf1KWS8wBEJGQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W97CAVxV6KbvVDLf1KWS8wBEJGQ/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/W97CAVxV6KbvVDLf1KWS8wBEJGQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/W97CAVxV6KbvVDLf1KWS8wBEJGQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=0RTA2IKOnUM:6SZHCxJ2q0o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=0RTA2IKOnUM:6SZHCxJ2q0o:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=0RTA2IKOnUM:6SZHCxJ2q0o:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=0RTA2IKOnUM:6SZHCxJ2q0o:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=0RTA2IKOnUM:6SZHCxJ2q0o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=0RTA2IKOnUM:6SZHCxJ2q0o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=0RTA2IKOnUM:6SZHCxJ2q0o:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=0RTA2IKOnUM:6SZHCxJ2q0o:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/0RTA2IKOnUM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/0RTA2IKOnUM/post.aspx</link>
      <author>Cedric Boudoya</author>
      <comments>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-e28093-Fix-Sound-Video-and-Network-adapter.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=20c78113-b66a-4b3d-89c4-8118b61fc836</guid>
      <pubDate>Tue, 20 Jan 2009 13:44:07 -0500</pubDate>
      <category>How To</category>
      <category>Windows 7</category>
      <dc:publisher>Cedric Boudoya</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=20c78113-b66a-4b3d-89c4-8118b61fc836</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=20c78113-b66a-4b3d-89c4-8118b61fc836</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-e28093-Fix-Sound-Video-and-Network-adapter.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=20c78113-b66a-4b3d-89c4-8118b61fc836</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=20c78113-b66a-4b3d-89c4-8118b61fc836</feedburner:origLink></item>
    <item>
      <title>How To: Install Windows 7 on VirtualBox 2.1 – Installation details</title>
      <description>&lt;p&gt;On my previous blog posts, I cover the installation of VirtualBox 2.1 and I go over the step-by-steps to create a virtual machine to host Windows 7.&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-VirtualBox-2.1-Installation-Guide.aspx"&gt;How to: VirtualBox 2.1 Installation Guide&lt;/a&gt;  &lt;li&gt;&lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-Install-Windows-7-on-VirtualBox-2.1-Create-a-virtual-machine.aspx"&gt;How To: Install Windows 7 on VirtualBox 2.1 - Create a virtual machine&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I will now go over the details to install Windows 7.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;You should have the VirtualBox setup and started the virtual machine by clicking on the start button. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_4.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_1.png" width="244" height="209"&gt;&lt;/a&gt; &lt;br&gt;Click OK.&lt;br&gt;  &lt;li&gt;The first run wizard starts. Select Image File and browse your image on your drive. &lt;br&gt;&amp;nbsp;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_10.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_4.png" width="244" height="242"&gt;&lt;/a&gt;  &lt;ol&gt; &lt;li&gt;once you clicked the browse button, click the add button and select the ISO file for Windows 7. I am using 7000.0.081212-1400_client_en-us_Ultimate-GB1CULFRE_EN_DVD.iso &lt;br&gt;&amp;nbsp;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_16.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_7.png" width="244" height="193"&gt;&lt;/a&gt;&amp;nbsp; &lt;br&gt;Click Select and go get a coffee. &lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Windows is loading files. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_18.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_8.png" width="244" height="199"&gt;&lt;/a&gt;  &lt;li&gt;Starting Windows &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_34.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_16.png" width="244" height="171"&gt;&lt;/a&gt;&amp;nbsp; &lt;li&gt;Select Regional Settings. Click on Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_36.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_17.png" width="244" height="205"&gt;&lt;/a&gt;  &lt;li&gt;Start the installation. Click on Install Now. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_40.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_19.png" width="244" height="205"&gt;&lt;/a&gt;  &lt;li&gt;Setup is starting. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_42.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_20.png" width="244" height="204"&gt;&lt;/a&gt;  &lt;li&gt;License Terms. Check I accept the license terms and click Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_44.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_21.png" width="244" height="204"&gt;&lt;/a&gt;  &lt;li&gt;Type of installation. Click Custom (advanced). &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_46.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_22.png" width="244" height="204"&gt;&lt;/a&gt;  &lt;li&gt;Select Installation drive. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_48.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_23.png" width="244" height="205"&gt;&lt;/a&gt;  &lt;li&gt;Installing… &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_50.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_24.png" width="244" height="204"&gt;&lt;/a&gt;  &lt;li&gt;Enter your account and computer name. and enter your password on the next screen. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_52.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_25.png" width="244" height="200"&gt;&lt;/a&gt;  &lt;li&gt;Enter serial number. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_54.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_26.png" width="244" height="199"&gt;&lt;/a&gt;  &lt;li&gt;Set up windows updates. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_56.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_27.png" width="244" height="201"&gt;&lt;/a&gt;  &lt;li&gt;Review your time and date settings. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_58.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_28.png" width="244" height="200"&gt;&lt;/a&gt;  &lt;li&gt;Windows 7 starting. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_60.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_29.png" width="244" height="189"&gt;&lt;/a&gt;  &lt;li&gt;You should now see the Windows 7 desktop. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_62.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToInstallWindows.1Installationdetails_B956/image_thumb_30.png" width="244" height="200"&gt;&lt;/a&gt;&amp;nbsp; &lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Now that it is in installed, more configurations are necessary to fix the sound and video and the network adapter.&amp;nbsp; In the next post, I will provide the fixes.&lt;br&gt;I hope that this article helped out to install Windows 7 and have fun with it.&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ff8ea435-3e9f-42b1-aa4a-03ab7fdbe9b2" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Windows%207" rel="tag"&gt;Windows 7&lt;/a&gt;,&lt;a href="http://technorati.com/tags/VirtualBox" rel="tag"&gt;VirtualBox&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OCFf5viBQlLBqwp9fNteL2TqbGE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OCFf5viBQlLBqwp9fNteL2TqbGE/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/OCFf5viBQlLBqwp9fNteL2TqbGE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OCFf5viBQlLBqwp9fNteL2TqbGE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=tfegb7lR0iY:1cykhLIPVdU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=tfegb7lR0iY:1cykhLIPVdU:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=tfegb7lR0iY:1cykhLIPVdU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=tfegb7lR0iY:1cykhLIPVdU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=tfegb7lR0iY:1cykhLIPVdU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=tfegb7lR0iY:1cykhLIPVdU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=tfegb7lR0iY:1cykhLIPVdU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=tfegb7lR0iY:1cykhLIPVdU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/tfegb7lR0iY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/tfegb7lR0iY/post.aspx</link>
      <author>Cedric Boudoya</author>
      <comments>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-e28093-Installation-details.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=2c17c273-c936-4f46-bf36-a7955bc0b629</guid>
      <pubDate>Tue, 20 Jan 2009 13:42:59 -0500</pubDate>
      <category>How To</category>
      <category>Windows 7</category>
      <dc:publisher>Cedric Boudoya</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=2c17c273-c936-4f46-bf36-a7955bc0b629</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=2c17c273-c936-4f46-bf36-a7955bc0b629</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-e28093-Installation-details.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=2c17c273-c936-4f46-bf36-a7955bc0b629</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=2c17c273-c936-4f46-bf36-a7955bc0b629</feedburner:origLink></item>
    <item>
      <title>How To: Install Windows 7 on VirtualBox 2.1 - Create a virtual machine</title>
      <description>&lt;p&gt;Today, I will go through the step by step instructions to setup VirtualBox for Windows 7. &lt;br&gt;First of all, You will need to install &lt;a target="_blank" href="http://www.virtualbox.org/wiki/Downloads"&gt;VirtualBox&lt;/a&gt;. Follow my &lt;a href="http://blogs.visoftinc.com/archive/2009/01/15/How-To-VirtualBox-2.1-Installation-Guide.aspx"&gt;VirtualBox installation guide&lt;/a&gt; from a previous blog post if you need the step-by-steps. &lt;br&gt;&lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_4.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_1.png" width="244" height="155"&gt;&lt;/a&gt; &lt;/p&gt; &lt;ol&gt; &lt;li&gt;Clicking on the "New" button in the user interface will guide you through setting up a new virtual machine (VM). Click Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_2.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;li&gt;You must provide a &lt;strong&gt;name&lt;/strong&gt; for your VM, and the &lt;strong&gt;type of operating system&lt;/strong&gt; (OS). &lt;br&gt;Click Next. &lt;br&gt;&amp;nbsp;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_14.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_6.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;li&gt;You must give the &lt;strong&gt;amount of memory (RAM) for Guest OS. &lt;br&gt;&lt;/strong&gt;If your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM. &lt;br&gt;Click Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_6.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_2.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;li&gt;You must specify a &lt;strong&gt;virtual hard disk&lt;/strong&gt; for your VM. Click New. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_10.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_4.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;ol&gt; &lt;li&gt;Click Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_12.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_5.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;li&gt;Select storage type “dynamically expanding storage”. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_16.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_7.png" width="244" height="221"&gt;&lt;/a&gt; &lt;br&gt; &lt;li&gt;Specify space with 20 GB. Click Next. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_18.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_8.png" width="244" height="221"&gt;&lt;/a&gt; &lt;br&gt;&lt;br&gt;Pick a location on your drive to store the virtual hard drive (.vdi).&lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_20.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_9.png" width="244" height="183"&gt;&lt;/a&gt;&amp;nbsp; &lt;br&gt;Click Save &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_22.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_10.png" width="244" height="221"&gt;&lt;/a&gt;&amp;nbsp; &lt;br&gt;Click Next.  &lt;li&gt;Click Finish. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_24.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_11.png" width="244" height="221"&gt;&lt;/a&gt; &lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Now you get to review the virtual hard disk details. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_28.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_13.png" width="244" height="221"&gt;&lt;/a&gt;  &lt;li&gt;Finally, review the virtual machine details. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_30.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_14.png" width="244" height="221"&gt;&lt;/a&gt;&amp;nbsp; &lt;li&gt;You are done with the virtual machine set up. You should see the main screen of VirtualBox. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_25.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_3.png" width="244" height="163"&gt;&lt;/a&gt;  &lt;li&gt;If you click &lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_31.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowToVirtualBox2.1Createavirtualmachine_A2DA/image_thumb_12.png" width="52" height="70"&gt;&lt;/a&gt;, the virtual machine will start. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;My next blog post will go over the installation process of Windows 7 on VirtualBox.&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ec5af26a-cc55-4b94-8d02-287ebade3810" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/VirtualBox" rel="tag"&gt;VirtualBox&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Windows%207" rel="tag"&gt;Windows 7&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KweQcUbExdyOt66BZrOEwWHzNzI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KweQcUbExdyOt66BZrOEwWHzNzI/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/KweQcUbExdyOt66BZrOEwWHzNzI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KweQcUbExdyOt66BZrOEwWHzNzI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=-xlijkRdnOM:LSVqRtxYyDQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=-xlijkRdnOM:LSVqRtxYyDQ:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=-xlijkRdnOM:LSVqRtxYyDQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=-xlijkRdnOM:LSVqRtxYyDQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=-xlijkRdnOM:LSVqRtxYyDQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=-xlijkRdnOM:LSVqRtxYyDQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=-xlijkRdnOM:LSVqRtxYyDQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=-xlijkRdnOM:LSVqRtxYyDQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/-xlijkRdnOM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/-xlijkRdnOM/post.aspx</link>
      <author>Cedric Boudoya</author>
      <comments>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-Create-a-virtual-machine.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=8c980e25-3c5b-4d82-8e60-a3cb7e99b5c2</guid>
      <pubDate>Tue, 20 Jan 2009 13:41:40 -0500</pubDate>
      <category>How To</category>
      <category>Windows 7</category>
      <dc:publisher>Cedric Boudoya</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=8c980e25-3c5b-4d82-8e60-a3cb7e99b5c2</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=8c980e25-3c5b-4d82-8e60-a3cb7e99b5c2</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/01/20/How-To-Install-Windows-7-on-VirtualBox-2.1-Create-a-virtual-machine.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=8c980e25-3c5b-4d82-8e60-a3cb7e99b5c2</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=8c980e25-3c5b-4d82-8e60-a3cb7e99b5c2</feedburner:origLink></item>
    <item>
      <title>How To: VirtualBox 2.1 Installation Guide</title>
      <description>&lt;p&gt;In this step-by-step guide, we will install VirtualBox 2.1.&amp;nbsp; This article is the first in a multi-part series on installing Windows 7 beta on a VirtualBox virtual machine.&amp;nbsp; Let's get started...&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Get the virtual box binaries&amp;nbsp; and its source code from &lt;a title="http://www.virtualbox.org/wiki/Downloads" href="http://www.virtualbox.org/wiki/Downloads"&gt;http://www.virtualbox.org/wiki/Downloads&lt;/a&gt;.  &lt;li&gt;Launch VirtualBox-2.1.0-41146-Win_x86.msi  &lt;li&gt;Click Next &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_2.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb.png" width="244" height="193"&gt;&lt;/a&gt;   &lt;li&gt;Accept the terms… and click Next &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_4.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_1.png" width="244" height="193"&gt;&lt;/a&gt;  &lt;li&gt;Click Next &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_8.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_3.png" width="244" height="193"&gt;&lt;/a&gt;  &lt;li&gt;Click Next &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_10.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_4.png" width="244" height="193"&gt;&lt;/a&gt;  &lt;li&gt;Click Install &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_12.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_5.png" width="244" height="193"&gt;&lt;/a&gt;  &lt;li&gt;On the Warning Message, click Continue Anyway (twice) &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_14.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_6.png" width="244" height="195"&gt;&lt;/a&gt;  &lt;li&gt;On the Warning Message, click Continue Anyway &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_16.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_7.png" width="244" height="195"&gt;&lt;/a&gt;  &lt;li&gt;Click Finish &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_18.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_8.png" width="244" height="193"&gt;&lt;/a&gt;  &lt;li&gt;Once the application run, cancel the registration form if you want. &lt;br&gt;&lt;a href="http://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_20.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://blogs.visoftinc.com/image.axd?picture=WindowsLiveWriter/HowtoInstallVirtualBox2.1_9E9C/image_thumb_9.png" width="244" height="223"&gt;&lt;/a&gt;&amp;nbsp; &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;You are now done installing VirtualBox 2.1. &lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ce6d38d8-1140-4cf7-ab2c-8ae34f0d6091" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/VirtualBox" rel="tag"&gt;VirtualBox&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7FpsgATXE-lQ5HZ2NTVeQSLpyKM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7FpsgATXE-lQ5HZ2NTVeQSLpyKM/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/7FpsgATXE-lQ5HZ2NTVeQSLpyKM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7FpsgATXE-lQ5HZ2NTVeQSLpyKM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=k5RNhc0cEic:sSk-Ih33fiA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=k5RNhc0cEic:sSk-Ih33fiA:YGfevXCVqpo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?d=YGfevXCVqpo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=k5RNhc0cEic:sSk-Ih33fiA:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=k5RNhc0cEic:sSk-Ih33fiA:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=k5RNhc0cEic:sSk-Ih33fiA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=k5RNhc0cEic:sSk-Ih33fiA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/VisoftIncBlogs?a=k5RNhc0cEic:sSk-Ih33fiA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/VisoftIncBlogs?i=k5RNhc0cEic:sSk-Ih33fiA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/VisoftIncBlogs/~4/k5RNhc0cEic" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/VisoftIncBlogs/~3/k5RNhc0cEic/post.aspx</link>
      <author>Cedric Boudoya</author>
      <comments>http://blogs.visoftinc.com/archive/2009/01/20/How-To-VirtualBox-2.1-Installation-Guide.aspx#comment</comments>
      <guid isPermaLink="false">http://blogs.visoftinc.com/post.aspx?id=19d6c2a5-1c56-4829-9cef-4debe93657a3</guid>
      <pubDate>Tue, 20 Jan 2009 13:38:23 -0500</pubDate>
      <category>How To</category>
      <category>Windows 7</category>
      <dc:publisher>Cedric Boudoya</dc:publisher>
      <pingback:server>http://blogs.visoftinc.com/pingback.axd</pingback:server>
      <pingback:target>http://blogs.visoftinc.com/post.aspx?id=19d6c2a5-1c56-4829-9cef-4debe93657a3</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://blogs.visoftinc.com/trackback.axd?id=19d6c2a5-1c56-4829-9cef-4debe93657a3</trackback:ping>
      <wfw:comment>http://blogs.visoftinc.com/archive/2009/01/20/How-To-VirtualBox-2.1-Installation-Guide.aspx#comment</wfw:comment>
      <wfw:commentRss>http://blogs.visoftinc.com/syndication.axd?post=19d6c2a5-1c56-4829-9cef-4debe93657a3</wfw:commentRss>
    <feedburner:origLink>http://blogs.visoftinc.com/post.aspx?id=19d6c2a5-1c56-4829-9cef-4debe93657a3</feedburner:origLink></item>
  </channel>
</rss>
