<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Irascian Ltd</title>
    <description>Software Development in a DotCom World</description>
    <link>http://irascian.com/cs/roller/default.aspx</link>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Community Server v2.0 (http://www.communityserver.org)</generator>
    <item>
      <title>Interesting Finds: 2008.06.12</title>
      <description>&lt;p&gt;&lt;strong&gt;Web&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx" target="_blank"&gt;Introducing IE=EmulateIE7&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.technet.com/mscom/archive/2008/06/09/microsoft-com-operations-performance-analysis-of-iis-7-0-windows-server-2008.aspx" target="_blank"&gt;Microsoft.com Operations Performance Analysis of IIS 7.0/Windows Server 2008&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;.NET&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.codeplex.com/SharpArchitecture" target="_blank"&gt;S#arp Architecture: ASP.NET MVC with NHibernate and Spring&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/pollrobots/archive/2008/06/09/using-ccr-with-asp-net.aspx" target="_blank"&gt;Using CCR with ASP.NET&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnet.dzone.com/news/net-memory-control-use-gchandl" target="_blank"&gt;.NET Memory control : Use GCHandle to pin down the objects&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Other&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.ytechie.com/2008/06/what-a-developer-needs-from-their-manager.html" target="_blank"&gt;What a developer needs from their manager&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://resharper.blogspot.com/2008/06/resharper-40-gone-diamond.html" target="_blank"&gt;ReSharper 4.0 Gone Diamond&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6269279" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/yuanjian/archive/2008/06/11/interesting-finds-2008-06-12.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6269279</guid>
      <pubDate>Thu, 12 Jun 2008 00:41:50 GMT</pubDate>
    </item>
    <item>
      <title>Set a Validator's Display to 'None' for the ValidatorCalloutExtender</title>
      <description>If you look at Figure 15-1 in ASP.NET 3.5 For Dummies , you'll notice that there's an almost-hidden question mark (?) behind the AJAX Control Kit's ValidatorCallout control. The arrow in the picture points to the mistake (bug) in the book. At the time I took the screenshot , I couldn't figure out how to get rid of the underlying validator's error message text. I left the question mark with the intention of getting back to it but I never did. I figured out the problem by the time I shipped the book...(&lt;a href="http://weblogs.asp.net/kencox/archive/2008/06/11/set-a-validator-s-display-to-none-for-the-validatorcalloutextender.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6269041" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/kencox/archive/2008/06/11/set-a-validator-s-display-to-none-for-the-validatorcalloutextender.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6269041</guid>
      <pubDate>Wed, 11 Jun 2008 21:56:00 GMT</pubDate>
    </item>
    <item>
      <title>Performance Tip: Return Only Necessary Columns Using LINQ</title>
      <description>&lt;p&gt;I was running into an issue where one of my webmethods was taking a large amount of time to return a small set (5-10 objects). I was using LINQ to SQL. I noticed that the LINQ to SQL query was returning all of the rows. After looking into the table a bit further, I noticed that the table included some columns with a larger type (old text column, image column, etc). So, I decided to modify my select to contain just the columns I needed. It improved my response time from roughly 8 seconds to 250 milliseconds. Here's a sample select statement:&lt;/p&gt;  &lt;blockquote&gt;   &lt;pre class="code"&gt;&lt;span&gt;From &lt;/span&gt;t &lt;span&gt;In &lt;/span&gt;db.News _
&lt;span&gt;Where &lt;/span&gt;t.NewsID = NewsID _
&lt;span&gt;Select New With &lt;/span&gt;{.Title = t.Title, .Abstract = t.Abstract, .DatePublished = t.DatePublished)&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead of enumerating these items as type NewsPosting, I had to build a list of type Object or create a new custom type. For my purpose, a Generic.List(Of Object) worked just fine.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6267507" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/jgaylord/archive/2008/06/10/performance-tip-return-only-necessary-columns-using-linq.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6267507</guid>
      <pubDate>Wed, 11 Jun 2008 03:30:37 GMT</pubDate>
    </item>
    <item>
      <title>Silverlight 2 Beta2 Release</title>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Silverlight 2 Beta2 is vandaag op de markt gelanceerd. Je kunt de toolondersteuning voor Silverlight 2 beta1, Visual Studio en&amp;nbsp;Expression Blend&amp;nbsp;&lt;A href="http://silverlight.net/GetStarted/" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;downloaden.&lt;/P&gt;
&lt;P&gt;Aan de&amp;nbsp;Beta2 zijn heel wat functies toegevoegd (meer details hieronder). Toch is het&amp;nbsp;nog&amp;nbsp;steeds een download van 4.6MB, met een downloadtijd van minder dan 10 seconden. Software van het&amp;nbsp;.NET framework of andere software is niet nodig om ermee te kunnen werken. Ook werken alle functies cross-browser op&amp;nbsp;Mac en&amp;nbsp;Windows pc's en&amp;nbsp;zullen ze&amp;nbsp;via de Moonlight 2 release ook ondersteund worden op&amp;nbsp;Linux.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Silverlight 2 beta2 ondersteunt een go-live licentie&amp;nbsp;waarmee je kan starten met commerciele applicaties in Silverlight 2.&amp;nbsp;Er zullen&amp;nbsp;enkele API veranderingen plaatsvinden tussen Beta2 en de&amp;nbsp;uiteindelijke release, waardoor je erop moet voorbereid zijn dat de applicaties die je hebt gecre�erd met de Beta2 geupdate moeten worden wanneer de finale versie uitkomt. Maar we denken dat deze veranderingen eenvoudig en relatief gemakkelijk zullen zijn, en dat je gerust kunt beginnen plannen en cre�eren.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Je kunt Silverlight Beta2 applicaties bouwen met de VS2008 Tools voor Silverlight en Expression Blend 2.5 June Previeuw. Je kunt beide &lt;A href="http://silverlight.net/GetStarted/" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;downloaden. De VS2008 Tools voor&amp;nbsp;de Silverlight download werkt met&amp;nbsp;zowel VS 2008 als de recente&amp;nbsp; &lt;A href="http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx" target=_blank&gt;&lt;FONT color=#0066cc&gt;VS 2008 SP1 beta&lt;/FONT&gt;&lt;/A&gt; release.&amp;nbsp; &lt;/P&gt;
&lt;H3&gt;&lt;U&gt;Verbeteringen aan UI&amp;nbsp;en Control&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Silverlight 2 Beta2&amp;nbsp;bevat een hoop verbeteringen in de UI en Control:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Meer ingebouwde Controls&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Beta1 bevatte slechts enkele ingebouwde controls in de core Silverlight setup. De meeste algemene controls (Button, ListBox, Slider, enz)&amp;nbsp;waren ondergebracht&amp;nbsp;in gescheiden assemblies&amp;nbsp;die je moest samenbrengen in je applicatie (waardoor de applicatie download dus langer duurde). Beta 2 installeert nu&amp;nbsp;meer dan 30 van de algemene controls als onderdeel van de core Silverlight 2 download. Dit wil zeggen dat je Silverlight 2 applicaties kunt bouwen die core controls&amp;nbsp;van&amp;nbsp;kleiner dan 3kb gebruiken.&amp;nbsp;Het resultaat is een kleine Silverlight applicatie met een zeer snelle opstarttijd.&lt;/P&gt;
&lt;P&gt;Naast de core controls&amp;nbsp;in de basisinstallatie van de&amp;nbsp;Silverlight 2 setup, brengen we deze week ook higher-level controls uit die ge�mplementeerd zijn&amp;nbsp;in&amp;nbsp;aparte assemblies,&amp;nbsp;die je kan verwerken in je applicatie en&amp;nbsp;waarnaar je kan refereren. Deze controls&amp;nbsp;zoals de DataGrid (meer details&amp;nbsp;bij de nieuwe Beta2 functies beneden)&amp;nbsp;,&amp;nbsp;Calendar (nu met meerdere dagen selectie en&amp;nbsp;blackout data ondersteuning in Beta2), en de TabPanel control (nieuw in Beta2).&lt;/P&gt;
&lt;P&gt;Op het einde van de rit&amp;nbsp;verwachten&amp;nbsp;we meer dan 100 controls voor Silverlight.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Ondersteuning voor de bewerking van Control Template&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;E�n van de krachtigste functies in&amp;nbsp;het WPF en Silverlight programming model is de mogelijkheid om&amp;nbsp;de look en feel van de controls helemaal te veranderen. Zo kunnen ontwikkelaars en ontwerpers de UI van de controls bewerken&amp;nbsp;op subtiele&amp;nbsp;of ingrijpende wijze, en het laat ook&amp;nbsp;een enorme flexibliteit toe.Ik behandelde deze materie enigzins &lt;A href="http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-7-using-control-templates-to-customize-a-control-s-look-and-feel.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt; in&amp;nbsp;mijn vorige Silverlight Control Templating blog.&lt;/P&gt;
&lt;P&gt;De&amp;nbsp;Expression Blend 2.5 June Preview van deze week bevat&amp;nbsp;ontwerpondersteuning in om control templates te bewerken. Dit maakt het ons gemakkelijk om een snelle aanpassing te doen aan het uitzicht&amp;nbsp;van elke control zonder naar de XAML broncode te moeten gaan.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Om de control template editing in actie te zien,&amp;nbsp;sleep je gewoon de&amp;nbsp;twee slider controls naar je Expression Blend design surface :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step1.png"&gt; &lt;/P&gt;
&lt;P&gt;Het kan voorkomen dat we de&amp;nbsp;slider head in de standaard Slider control template te groot en te breed vinden&amp;nbsp;voor onze applicatie. Om de control editing template te gebruiken om dit&amp;nbsp;te veranderen,&amp;nbsp;klikken we met de rechtermuisknop op een van de sliders en selecteren we&amp;nbsp;het "Edit Control Parts" context menu item. We&amp;nbsp;kiezen&amp;nbsp;vervolgens om een&amp;nbsp;'new control template' aan te maken voor onze slider (en we beginnen vanaf nul). Een andere optie is een kopie bewerken van de&amp;nbsp;ingebouwde control template (en starten&amp;nbsp;vanaf daar om het te bewerken):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step2.png"&gt; &lt;/P&gt;
&lt;P&gt;Nadat we gekozen hebben om een kopie van de bestaande control template te bewerken, zal Blend&amp;nbsp;ons vragen om een&amp;nbsp;herbruikbare style source te cre�ren en een naam te geven&amp;nbsp;waarin we onze control template zullen definieren. We kunnen het een naam geven en dan verkiezen we&amp;nbsp;dat onze stijl wordt opgeslagen&amp;nbsp;op applicatieniveau (in de&amp;nbsp;App.xaml) of in onze huidige page/usercontrol :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step3.png"&gt; &lt;/P&gt;
&lt;P&gt;Wanneer we&amp;nbsp;"ok"&amp;nbsp; klikken,&amp;nbsp;zullen we ons in de template&amp;nbsp;editing mode bevinden van onze Slider control. We kunnen elk onderliggend element&amp;nbsp;veranderen, uitrekken of&amp;nbsp;toevoegen/verwijderen in de&amp;nbsp;control van de Slider template. Let hieronder op hoe we in de template editing mode&amp;nbsp;kunnen&amp;nbsp;zien hoe we elk onderliggend element kunnen selecteren in de control van de Slider template (ze zijn in het rood omcirkeld hieronder in de "object" window)&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Om onze sliderhead smaller te maken, kunnen we&amp;nbsp;het "HorizontalThumb" element selecteren in de control template en&amp;nbsp;de breedte aanpassen (ofwel grafisch of via de property grid):&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step4.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen dan de breadcrumb navigatie&amp;nbsp;bar gebruiken, bovenaan de designer surface, om terug naar onze pagina te navigeren en dus om de control template wijzigingen&amp;nbsp;te zien. :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step5.png"&gt; &lt;/P&gt;
&lt;P&gt;Let op dat rechts enkel ��n van de slider control de nieuwe Style recource gebruikt met de control template die wij definieerden.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Om dezelfde&amp;nbsp;style resource&amp;nbsp;toe te voegen&amp;nbsp;aan de andere slider control,&amp;nbsp;kunnen we hem selecteren via&amp;nbsp;rechtermuisklik, en dan klikken op "Apply Resource" context menu om onze "ScottSlider" style eraan toe te voegen :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step6.png"&gt; &lt;/P&gt;
&lt;P&gt;Eens we dit gedaan hebben zullen beide sliders refereren naar dezelfde style :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step7.png"&gt; &lt;/P&gt;
&lt;P&gt;De veranderen die we maken in de&amp;nbsp;"ScottSlider" style&amp;nbsp;worden&amp;nbsp;automatisch toegepast op beide controls.&lt;/P&gt;
&lt;P&gt;Let op dat alle controls in Silverlight 2 control templates ondersteunen. Ze&amp;nbsp;ondersteunen ook de bovenstaande bewerkingen in Expression Blend.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Ondersteuning voor Visual State Manager (VSM)&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Control templates in Silverlight en WPF ondersteunen&amp;nbsp;zowel de "look" van een control, als de "feel" van een control. Met "feel" bedoel ik&amp;nbsp;zijn interactieve gevoeligheidsveranderingen. Bijvoorbeeld : hoe&amp;nbsp;ziet hij eruit als je erop klikt,&amp;nbsp;als&amp;nbsp;het gefocused is of net de focus verliest,&amp;nbsp;in ingedrukte toestand,&amp;nbsp;als iets erin geselecteerd is enz ... . Soms wil je animaties starten wanneer er interactie is tussen de&amp;nbsp;control en de gebruiker.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;E�n van de nieuwe dingen die we introduceren met Silverlight 2 beta2 is een "Visual State Manager" (VSM) functie waarmee je gemakkelijker interactieve control templates kan&amp;nbsp;maken. VSM introduceert twee basis concepten die je voordeel kunnen bieden in een control template : "Visual States" en "State Transitions". Bijvoorbeeld, een control&amp;nbsp;zoals een Button definieert meerdere visuele statussen voor zichzelf&amp;nbsp;- "Normal", "MouseOver", "Pressed", "Disabled", "Focused", "Unfocused". In de template&amp;nbsp;editing mode in Blend kunnen de&amp;nbsp;ontwerpers nu de looks in elke staat aanpassen, alsook de overgang wanneer je&amp;nbsp;de control doet veranderen van de ene staat in de andere.&lt;/P&gt;
&lt;P&gt;Wat tof is aan dit model is dat ontwerpers helemaal geen code hoeven te schrijven, ze moeten geen manuele animatie storyboards schrijven en moeten het object model niet verstaan om productief te zijn. Dit maakt het leerproces voor het maken van interactieve control templates heel gemakkelijk, en in elk geval kan een bestaande grafisch ontwerper heel gemakkelijk werken aan Silverlight projecten. Later dit jaar zullen we de Visual State Manager&amp;nbsp;(VSM)&amp;nbsp;ondersteuning toevoegen tot WPF, waardoor je dezelfde methodes kan toepassen&amp;nbsp;op Windows applicaties en templates kan&amp;nbsp;delen tussen WPF en Silverlight Projecten.&lt;/P&gt;
&lt;P&gt;Om een voorbeeld te zien van deze actie, voegen we een Button control toe op onze design surface :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step23.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen dan rechts klikken op de button en&amp;nbsp;zijn control template bewerken. In plaats van&amp;nbsp;te beginnen met de bestaande standaard control template (zoals we hebben gedaan in het slider voorbeeld hierboven), cre�ren we nu een lege control template:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step10.png"&gt; &lt;/P&gt;
&lt;P&gt;Blend zal ons de naam vragen van de Style resource die we willen cre�ren.&amp;nbsp;We&amp;nbsp;noemen het "ScottButton" en we klikken op ok.&amp;nbsp;Hierdoor zal de designer in control editing mode omgezet worden voor de button en starten met een lege control template:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step11.png"&gt; &lt;/P&gt;
&lt;P&gt;Wat je vooral moet opmerken in het bovenstaande is het nieuwe "States" venster in Blend.&amp;nbsp;Daarin zullen we alle beschikbare "Visual States" te zien krijgen die de Button control vertoont. Hierboven is de "Base" state of status geselecteerd, waardoor we de gebruikelijke visuele tree van onze Button control template kunnen defini�ren. &lt;/P&gt;
&lt;P&gt;We kunnen daarna enkele vectori�le elementen toevoegen aan onze base status (basisstatus), die het uitzicht van een gepersonaliseerde button definieert zoals hieronder. We zouden de ingebouwde tool voor vectorieel tekenen kunnen gebruiken dat ondersteund wordt door Blend om deze afbeeldingen te maken. Een andere mogelijkheid is Expression Design of Adobe Illustrator gebruiken om vectori�le elementen te cre�ren en het finale resultaat implementeren in Blend. Hieronder voegen we 4 "Path" elementen toe aan onze control template, een ronde achtergrond ("background" genaamd), een drop shadow ("shadow" genoemd), een 40% transparantie "shine" dat een gloei-effect toevoegt bovenaan en een dat de standaard inner content definieer (in dit geval een afbeelding van een huis):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step12.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Opmerking:&amp;nbsp;we hadden ook een afbeelding kunnen importeren, maar als we gebruik maken van vector�ele elementen, krijgen we de flexibiliteit om de button in een latere fase te verkleinen/uittrekken/transformeren zodat we een crips look en feel behouden bij elke resolutie of verkleining (het is vooral handig in Silverlight mobile scenario's, waarin de schermresolutie kan vari�ren).&amp;nbsp;We zullen ook gemakkelijk een vectorieel element&amp;nbsp;veranderen of er animatie aan toevoegen.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Als we klaar zijn met de ontwerpfase van onze basisstatus hierboven, kunnen drukken op F5 om onze applicatie uit te voeren in de browser:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step13.png"&gt; &lt;/P&gt;
&lt;P&gt;Zoals je hierboven kan zijn, ziet onze Button er nu veel aantrekkelijker uit.&amp;nbsp;Ondanks deze nieuwe look, wekt de button nog steeds dezelfde focus, click en hover acties op zoals voorheen. Een ontwikkelaar die de buttons gebruikt moet de code dus niet veranderen als hij wil werken met een button die werd vormgegeven met onze nieuwe control template.&lt;/P&gt;
&lt;P&gt;Een nadeel van onze nieuwe button control template, is dat het niet interactief is. Dit betekent dat ik geen visuele feedback krijg als de button de focus krijgt of verliest, als je erover gaat met de muis of niet. Ik krijg ook geen mooie depress/bounce-back animatie als ik erop klik. &lt;/P&gt;
&lt;P&gt;Om interactiviteit toe te voegen aan onze button, keren we terug naar Blend en werken we terug in de control template van de button.&amp;nbsp;Daarnet voegden we vectoriele grafische elementen toe aan de basisstatus van onze button control. Hierdoor konden we de standaard visuele look definieren van alle visuele statussen van onze button. We kunnen nu teruggaan en elke afzonderlijke visuele statut&amp;nbsp;van de button personaliseren.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bijvoorbeeld, om een mouse-over actie te implementeren voor onze button, kunnen we de&amp;nbsp;"MouseOver" status in het "States" venster selecteren om dan de look van de button te cre�ren als het zich in die status bevindt. Hieronder heb ik het "shine" vectorieel element geselecteerd in onze control template en heb ik de Opacity eigenschap aangepast in de property grid zodat de button iets visueler is in de MouseOver status.&amp;nbsp;Merk op hoe blend automatisch het "Shine" element highlight met een rode stip en daarna de Opacity eigenschap plaatst in ons objectvenster.&amp;nbsp;Hierdoor kan je gemakkelijk alle veranderingen opvolgen die we hebben gemaakt tussen de "Base" status en de "MouseOver" status in onze control template:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step14.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen vervolgens de "Pressed" status selecteren in ons "States" venster en personaliseren hoe een button er moet uitzien als er op geklikt wordt.&amp;nbsp;We zullen twee&amp;nbsp;aanpassingen doen in de "Base" status. De eerste aanpassing is het "Shine" element zichtbaar maken (zoals in de MouseOver status). De tweede aanpassing zal de inhoud van de button control lichtjes een offset effect geven, terwijl het shadowelement op zijn plaats blijft. .&amp;nbsp;HIerdoor zal de button eruitzien alsof&amp;nbsp;ze niet ingedrukt is en zal het mooi contrasteren met de basis&amp;nbsp;visual:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step15.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen de offset verandering implementeren in de achtergrond, de inhoud en de shine elementen door ze te selecteren in de designer en dan een offset render transform erop toepassen in de property browser:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step16.png"&gt; &lt;/P&gt;
&lt;P&gt;En als we nu onze applicatie uitvoeren in de browser, dan zullen we zien dat onze button nu interactieve visuele feedback geeft als ze gebruikt wordt. Hieronder zie je de "normale" look van onze button:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step17.png"&gt; &lt;/P&gt;
&lt;P&gt;Het gloeieffect zoals hieronder krijg je door met de muis over de button te gaan:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step18.png"&gt; &lt;/P&gt;
&lt;P&gt;Door op de button te klikken zal ze 'ontklikken' en de shadow verbergen (het zal in de oorspronkelijke staat teruggeplaats worden als de muisklik stopt):&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step19.png"&gt; &lt;/P&gt;
&lt;P&gt;Merk op dat we geen code of XAML hebben moeten schrijven om de look en feel van onze Button te veranderen. De nieuwe Visual State Manager functie heeft de bewegingen tussen de visual states automatisch voor ons afgehandeld.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Silverlight bouwt voert een transitie Storyboard dynamisch voor je uit als je je van visual state naar visual state begeeft (en zo verkrijg je een vloeiende animatie tussen de twee states). Je hoeft hiervoor geen code te schrijven (opmerking: je hebt wel nog steeds de mogelijkheid om een een gepersonaliseerde Storyboard transitie toe te voegen als je dit wil, maar in de meeste gevallen is de automatische Storyboard transitie voldoende).&lt;/P&gt;
&lt;P&gt;Een functie waarvan je kan profiteren met de automatische transitie in Silverlight, is de mogelijkheid om de duur van een visual state transitie te personaliseren.&amp;nbsp;Je kan dit doen door te klikken op de pijl aan de linkerkant van een van visual state en een regel op te stellen die bepaald hoelang de transitie animatie zou mogen duren wanneer je van een visual state naar een andere gaat.&lt;/P&gt;
&lt;P&gt;Bijvoorbeeld, we zouden kunnen aanduiden dat de transitie van "Normal" naar "MouseOver" 2 seconden mag duren, door de onderstaande regel toe te voegen: &lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step20.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen deze regel dan zo configureren dat de transitie tussen Normal-&amp;gt; MouseOver slechts twee seconden mag duren:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step21.png"&gt; &lt;/P&gt;
&lt;P&gt;We kunnen dan klikken op de "MouseOver" state en een regel instellen waarmee aangeduid wordt dat de transitie van Mouseover -&amp;gt; 4 seconden mag duren:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step22.png"&gt; &lt;/P&gt;
&lt;P&gt;Als we nu de applicatie opnieuw uitvoeren, dan zien we dat de animatietransitie voor MouseOver scenario's trager verloopt, waardoor onze applicatie er wat meer afgewerkt uitziet. We hebben niet een lijn code moeten schrijven om dit allemaal mogelijk&amp;nbsp;te maken. &lt;U&gt;Alle controls&lt;/U&gt; die uitgebracht zijn met Silverlight 2 zullen ingebouwde support bevatten voor Control Template en Visual State Manager personalisatie zoals hierboven.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Om meer te leren over de nieuwe Visual State Manager&amp;nbsp;en Control Template Editing functies, bekijk dan zeker &lt;A href="http://timheuer.com/blog/archive/2008/06/04/skinning-silverlight-controls-made-easier.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt; and &lt;A href="http://timheuer.com/blog/archive/2008/06/04/silverlight-introduces-visual-state-manager-vsm.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;de tutorials&amp;nbsp;en de videos&amp;nbsp;&lt;A href="http://electricbeach.org/?p=98" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;, &lt;A href="http://expression.microsoft.com/en-us/cc643423.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;, en &lt;A href="http://electricbeach.org/?p=107" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;TextBox&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 bevat belangrijke verbeteringen aan de ingebouwde TextBox editing control. Ook Text scrolling&amp;nbsp;met text-wrap, multi-line text selecties, document navigation keys,&amp;nbsp;en&amp;nbsp;copy/paste&amp;nbsp;met het klembord worden nu ook ondersteund.&lt;/P&gt;
&lt;P&gt;Beta2 bevat nu ook IME&amp;nbsp;niveau 3 input ondersteuning (met onder andere candidate window selection) voor niet-Westerse charactersets:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://www.scottgu.com/blogposts/sl2beta2/step24.png"&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Input Ondersteuning&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 biedt ook toetsenbord ondersteuning in Fullscreen modus (pijltjes, tab, enter, home, end, pageup/down, space). Opmerking: volledige input ondersteuning is niet toegelaten om paswoord spoofing scenario's te vermijden.&lt;/P&gt;
&lt;P&gt;Beta2 biedt ook nieuwe APIs om inking en stylus te ondersteuning.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;UI Automatisatie and&amp;nbsp;Toegankelijkheid &lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Beta2 voegt UI Automatieframework ondersteuning toe aan Silverlight.&amp;nbsp;Met UI Automatie (of UIA) kunnen beeldschermlezers en andere assitieve tools componenten identificeren die allemaal samen je Silverlight 2 applicatie vormen.&amp;nbsp;Ze kunnen met deze combinatie ook in interactie treden.&lt;/P&gt;
&lt;P&gt;Beta2 gebruikt het UIA framework en voegt UIA gedragingen toe aan een initi�le set van Silverlight controls.&amp;nbsp;Met de finale release van Silverlight 2, zullen alle controls UIA gedragingen bevatten die gebaseerd zijn op UIA.&amp;nbsp;We zullen ook ondersteuning toevoegen voor hoge-contrast scenario's.&amp;nbsp;Met deze&amp;nbsp;functies zul toegankelijke,&amp;nbsp;sectie 58 compatibele applicaties kunnen bouwen. Deze&amp;nbsp;UIA ondersteuning zal je&amp;nbsp;ook in staat stellen om automatische UI testing te doen van applicaties.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Animatie and Graphic Systeem&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 voegt ondersteuning toe om animatie toe te voegen aan gepersonaliseerde dependency properties. Ondersteuning voor objectanimatie (animating structs) wordt nu ook ondersteund.&amp;nbsp; Beta2 ondersteunt eveneens de mogelijkheid om Storyboards in code te cre�ren die delen van de render tree kunnen animeren zonder dat ze eraan moeten worden toegevoegd (hierdoor kan je animaties helemaal in de code onderbrengen).&amp;nbsp;Per frame zal er animatie callback worden toegevoegd in de finale release.&lt;/P&gt;
&lt;P&gt;Beta2 bevat een nieuwe Visual Tree Helper static class dat geavanceerde inspectie&amp;nbsp;API's van de visual&amp;nbsp;tree. Het biedt functies, zoals de mogelijkheid om&amp;nbsp;de children van een element te nummeren en de&amp;nbsp;ancestor/parent krijgen van een gegeven referentie element. Deze API's werken met elk UIElement die je eraan toevoegt.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;DeepZoom&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 ondersteunt nu een XML gebaseerd manifestbestand voor DeepZoom collecties. Beta2 voegt ook uitbreidbare MultiScaleTileSource ondersteuning voor DeepZoom.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;WPF Compatibiliteit&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Silverlight Beta2 bevat een&amp;nbsp;hoop herstellingen/veranderingen om de API compatibiliteit tussen Silverlight en WPF te verbeteren (opmerking: de&amp;nbsp;finale release van Silverlight zal bijkomend compatibiliteitswerk bevatten).&amp;nbsp;We zullen ook enkele nieuwe API's toevoegen die we zullen introduceren in&amp;nbsp;Silverlight to WPF in .NET 3.5 SP1 deze zomer.&lt;/P&gt;
&lt;P&gt;Deze inspanningen, in combinatie met de VSM ondersteuning die we later dit jaar zullen toevoegen aan WPF, zullen je in staat stellen om code te hergebruiken door browser en desktop applicaties heen.&lt;/P&gt;
&lt;H3&gt;&lt;U&gt;Media verbeteringen&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Silverlight 2 Beta2 bevatten&amp;nbsp;significant&amp;nbsp;werk&amp;nbsp;wat Media betreft.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Adaptive Streaming&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 voegt ondersteuning toe voor "adaptive streaming". Hiermee kan je media encoderen tegen meerdere bit-rates. Dan kan je met een Silverlightapplicatie dynamisch switchen tussen hen afhankelijk van het netwerp en de CPU condities.&lt;/P&gt;
&lt;P&gt;Hierdoor worden veel rijkere media-ervaringen voor de eindgebruiker mogelijk. Het wordt zo immers mogelijk dat contentproviders zowel lower-end als higher-end bitrate versies van een video bieden. Silverlight kan dan de meest optimale versie kiezen, gebaseerd op de hardware en netwerkcapaciteit van de eindgebruiker. Als de machine- of&amp;nbsp;netwerkcondities&amp;nbsp;veranderen terwijl de gebruiker de video bekijkt, dan kan Silverlight automatisch overschakelen naar een meer gepaste bitrate zonder buffering of haperingen.&lt;/P&gt;
&lt;P&gt;De ondersteuning voor adaptive streaming van Silverlight is uitbreidbaar. Hierdoor kan&amp;nbsp;iedereen zijn eigen logica inpluggen om te bepalen vanwaar de media content komt en welke bitrate&amp;nbsp;er zou moeten worden gebruikt.&amp;nbsp;Dit betekent dat elke CDN of medialeverancier gemakkelijk zijn systeem kan integreren in Silverlight en zo video's&amp;nbsp;kan leveren van superhoge kwaliteit.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Content bescherming&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 bevat DRM contentbescherming, en ondersteunt Windows DRM en PlayReady DRM. Beide werken cross-browser en cross-platform. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Server Side Playlists&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 voegt ondersteuning toe voor serverside playlists (voorgaande releases ondersteunden enkel clientside playlists).&amp;nbsp; &lt;/P&gt;
&lt;H3&gt;&lt;U&gt;Verbeteringen voor netwerken&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Silverlight 2 Beta2 bevat een hoop werk op gebied van netwerken:&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Cross-domein Sockets&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Met Beta2 is cross-domein netwerkondersteuning mogelijk. Hiervoor wordt zowel HTTP als Sockets gebruikt (wat betekent dat je applicaties andere sites kan aanspreken dan de deze waarvan de applicatie was gedownload).&lt;/P&gt;
&lt;P&gt;Silverlight zal het bestaan van een XML policy bestand controleren op target servers, dat aanduid of cross-domein netwerktoegang toegelaten is.&amp;nbsp;Silverlight ondersteunt een nieuw XML policy bestand dat we hebben ontwikkeld, alsook Flash policy bestanden (wat betekent dat bestaande sites die openstaan voor Flash aangeroepen kunnen worden vanuit Silverlight zonder bijkomende inspanningen).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Background Thread Netwerken&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 laat nu toe dat Silverlightapplicaties netwerkverzoeken over background threads kunnen starten, alsook netwerkantwoorden over background threads behandelen. Hierdoor zijn een hele reeks krachtige scenario's mogelijk en kan je vermijden dat de browser's UI thread geblokkeerd wordt terwijl je zowel HTTP als Socket communicatie doet.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Duplex Communication (Server Push)&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 maakt ondersteuning mogelijk om duplex communicatie kanalen op te zetten met een WCF service op een server.&amp;nbsp;Hierdoor kan je hele mooie programmeermodellen maken waarmee servers boodschappen kunnen "pushen" naar Silverlight clients zonder dat de ontwikkelaar handmatig de servers moet bedienen om veranderingen door te voeren. Dit programmeermodel is zeer nuttig in een brede waaier aan scenario's, zoals instant messaging/chatapplicaties en monitoring/update applicaties zoals stock tickers en traderapplicaties. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Web Services&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 maakt belangrijke verbeteringen voor interop met SOAP gebaseerde webservices. Web service proxy class end-point URLs kunnen nu geconfigureerd worden zonder applicaties te moeten recompileren. Visual studio heeft nu een nieuwe "Silverlight-enabled WCF Service" project item template, dat je kan toevoegen aan ASP.NET webprojecten om services te&amp;nbsp;publiceren naar&amp;nbsp;clients.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;REST&amp;nbsp;en ADO.NET Data Services&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Silverlight bevat ondersteuning om te kunnen werken met REST&amp;nbsp;gebaseerde webservices.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Beta2 voegt ondersteuning toe om ADO.NET Data Services aan te roepen en te "consumeren" (voorheen bekend met codenaam: "Astoria").&amp;nbsp; ADO.NET Data Services zullen worden uitgebracht als onderdeel van .NET 3.5 SP1 en maakt publiceren mogelijk&amp;nbsp;van data eindpunten in een ASP.NET webproject, die consumeerbaar zijn vanaf elke client door gebruik te maken van REST URI's.&amp;nbsp;Silverlight Beta2 bevat nu ook ADO.NET Data Service clientondersteuning, waardoor je deze&amp;nbsp;services gemakkelijk kan aanroepen (en als je dit wil ook LINQ expressies gebruiken in SIlverlight om externe REST queries ernaar te verwijzen).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;JSON&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Silverlight ondersteunt het aanroepen van JSON-gebaseerde services op het&amp;nbsp;web.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Beta2 bevat nu&amp;nbsp; LINQ to JSON ondersteuning, waardoor je gemakkelijk JSON resultaten naar .NET objecten kunt queryen, filteren en mappen in een Silverlightapplicatie. Dit maakt het heel gemakkelijk om AJAX eindpunten en services die gepubliceerd zijn op het werk aan te roepen en ermee te werken.&amp;nbsp; &lt;/P&gt;
&lt;H3&gt;&lt;U&gt;Data verbeteringen&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Silverlight 2 Beta2 bevat een hoop werk op gebied van dataspace:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;DataGrid&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2 voegt een aantal nieuwe functies toe aan de DataGrid control, zoals ondermeer:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Auto-sizing ondersteuning voor kolommen en rijen 
&lt;LI&gt;Sorteren van kolommen (met ondersteuning voor zowel sortering voor ��n kolom als voor meerdere kolommen) 
&lt;LI&gt;Ondersteuning voor herordenen van kolommen door eindgebruikers (ze kunnen kolommen slepen en verplaatsen om de volgorde te herordenen) 
&lt;LI&gt;Ondersteuning voor "frozen' kolommen (waardoor je kan vermijden dat een bepaalde kolom gepersonaliseerd wordt) 
&lt;LI&gt;Prestatie en bugherstellingen &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;DataBinding&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Beta2&amp;nbsp; voegt meer core data-binding functies toe en betere validatie ondersteuning, zoals ondermeer:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Per-binding Validatie en BindingValidationError event handler ondersteuning&amp;nbsp;voor controls (waardoor je input validatie kan doen met TwoWay bindings) 
&lt;LI&gt;Ondersteuning voor binding expressies&amp;nbsp;voor attached properties 
&lt;LI&gt;Rijkere binding waardeconversie ondersteuning (met ook waardeconversie fallback ondersteuning) &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Ge�soleerd opslaan&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Met silverlight kunnen applicaties data lokaal op een client opslaan (via de functie "Isolated Storage").&amp;nbsp; Applicties kunnen gebruikers vragen om hen groottepermissies toe te kennen voor dit opslaan (bijvoorbeeld: een gebruiker kan een e-mailprogramma 50MB lokale opslagruimte toekennen).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Beta2 vermeerdert de standaard lokale opslagruimte die wordt&amp;nbsp;geboden door Silverlightapplicaties tot een grootte van 1MB. Beta2 biedt&amp;nbsp;nu ook betere eindgebruikerondersteuning voor het beheer van per-site&amp;nbsp;opslagpermissies, alsook de mogelijkheid om gemakkelijk de lokale opslagruimte van een applicatie aan te roepen of te verwijderen.&amp;nbsp;Management UI om dit te beheren, kan nu door een eindgebruiker worden opgevraagd door de rechtermuisklik op een Silverlightapplicatie en de "Silverlight Configuration" menu optie te kiezen.&lt;/P&gt;
&lt;H3&gt;&lt;U&gt;De compatibiliteit&amp;nbsp;met Silverlight 1.0&amp;nbsp;en Silverlight 2 Beta 1 begrijpen&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Silverlight 2 Beta2 is compatibel met applicaties die doelen op Silverlight&amp;nbsp;1.0.&lt;/P&gt;
&lt;P&gt;Silverlight 2 Beta2 zal geen applicaties uitvoeren die doelen op Silverlight 2 Beta1, omdat we een aantal API veranderingen hebben doorgevoerd tussen de twee beta's voor de nieuwe functies die zijn toegevoegd aan Silverlight 2.&amp;nbsp;Browsers&amp;nbsp;waarop Silverlight&amp;nbsp;2 Beta1 ge�nstalleerd is, bezoeken een site die een&amp;nbsp;Silverlight Beta2 applicatie host, zal gevraagd worden te upgraden naar de nieuwere beta van Silverlight. Eens ze dit gedaan hebben, zullen&amp;nbsp;ze geen Beta1 applicaties&amp;nbsp;kunnen uitvoeren&amp;nbsp;als ze Beta2 niet de�nstalleren. Dit betekent dat als je een sample hebt gepubliceerd op het web&amp;nbsp;die gebouwd werd met Beta1, je waarschijnlijk zal moeten updaten naar Beta2.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;We hebben &lt;A href="http://go.microsoft.com/fwlink/?LinkID=120655&amp;amp;clcid=0x409" target=_blank&gt;&lt;FONT color=#3399ff&gt;hier&lt;/FONT&gt;&lt;/A&gt; een document gepubliceerd waarin de veranderingen tussen Beta 1 en Beta 2 in detail te lezen zijn.&amp;nbsp;Ik beveel jullie ook aan&amp;nbsp;&lt;A href="http://adoguy.com/2008/06/06/What_s_Changed_in_Silverlight_2_Beta_2.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;What Changed in Silverlight 2 Beta2&lt;/FONT&gt;&lt;/A&gt; van Shawn Wildermuth te lezen&amp;nbsp;en de &lt;A href="http://adoguy.com/2008/06/06/Upgrading_your_Silverlight_2_Projects_to_Beta_2.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;Upgrading your Silverlight 2 Projects to Beta2&lt;/FONT&gt;&lt;/A&gt; posts voor meer details over enkele van de veranderingen tussen Beta1&amp;nbsp;en Beta2.&lt;/P&gt;
&lt;H3&gt;&lt;U&gt;Samenvatting&lt;/U&gt;&lt;/H3&gt;
&lt;P&gt;Om meer te leren over Silverlight 2 en&amp;nbsp;om&amp;nbsp;de&amp;nbsp;Beta2 release te downloaden, neem dan een kijkje op &lt;A href="http://silverlight.net/GetStarted/" target=_blank&gt;&lt;FONT color=#3399ff&gt;http://www.silverlight.net&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;en &lt;A href="http://expression.microsoft.com/en-us/cc643423.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;http://expression.microsoft.com&lt;/FONT&gt;&lt;/A&gt; websites.&amp;nbsp; We zullen artikels posten, alsook tutorials, video's en meer over beide websites in de komende dagen en weken. Ik zal ook enkele tutorials posten op mijn blog.&lt;/P&gt;
&lt;P&gt;ALs je ze nog niet hebt gelezen, dan kan ik ook mijn vorige blog posts &lt;A href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;First Look at Silverlight 2&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;en &lt;A href="http://weblogs.asp.net/scottgu/archive/2008/02/28/first-look-at-using-expression-blend-with-silverlight-2.aspx" target=_blank&gt;&lt;FONT color=#3399ff&gt;First Look at Expression Blend with Silverlight 2&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;aanbevelen, die ik enkele maanden terug heb geschreven toen Beta1 uitkwam, omdat&amp;nbsp;ze een goed overzicht bieden van het Silverlight programmeermodel en hoe&amp;nbsp;erop te doelen met zowel Visual Studio 2008 en&amp;nbsp; Expression Blend.&lt;/P&gt;
&lt;P&gt;Hopelijk kunnen jullie hiermee aan de slag,&lt;/P&gt;
&lt;P&gt;Scott&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6255219" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/scottgudutch/archive/2008/06/11/silverlight-2-beta2-released.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6255219</guid>
      <pubDate>Wed, 11 Jun 2008 06:02:00 GMT</pubDate>
    </item>
    <item>
      <title>Creating a Native Win32 Splash Screen</title>
      <description>&lt;p&gt;Splash screens are all the rage. They're cool, they're fun, and they can be a pain to program right. &lt;/p&gt;  &lt;p&gt;I though I would share a native Win32 splash solution with you on this rainy night in June (well, it is June here and it is raining from where I am, YMMV). This is slightly different from your typical splash screen as it's done using the Win32 API calls and it's fired off before the .NET Forms engine even gets started. As a result it's quick and snappy and doesn't intrude on your normal WinForms programming.&lt;/p&gt;  &lt;p&gt;First off, let's look at how we're going to invoke it. Here's the Program class that will call our normal splash screen:&lt;/p&gt;  &lt;div&gt;   &lt;div&gt;     &lt;pre&gt;&lt;span&gt;   1:&lt;/span&gt; [STAThread]&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   2:&lt;/span&gt; &lt;span&gt;private&lt;/span&gt; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; Main()&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   4:&lt;/span&gt;     SplashWindow.Current.Image = &lt;span&gt;new&lt;/span&gt; Bitmap(&lt;span&gt;typeof&lt;/span&gt;(Form1), &lt;span&gt;"splash.jpg"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   5:&lt;/span&gt;     SplashWindow.Current.ShowShadow = &lt;span&gt;true&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   6:&lt;/span&gt;     SplashWindow.Current.MinimumDuration = 3000;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   7:&lt;/span&gt;     SplashWindow.Current.Show();&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   9:&lt;/span&gt;     Application.EnableVisualStyles();&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  10:&lt;/span&gt;     Application.SetCompatibleTextRenderingDefault(&lt;span&gt;false&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  11:&lt;/span&gt;     Application.Run(&lt;span&gt;new&lt;/span&gt; Form1());&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  12:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Note that it's the first thing called (even before we do Application calls or create the main form). We're launching it using a JPG image but any embedded or external resource file will do (JPEG, PNG, BMP, etc.). There are a couple of options we turn on here like showing a shadow (if the OS supports it) and setting a duration. &lt;/p&gt;

&lt;p&gt;The duration is the minimum number of milliseconds to display the splash screen for. For example you can set this to 5000 (5 seconds) and no matter how much or how little your app is doing, the splash screen will stay around for at least this long. This is handy to keep it up even though your app may find a burst of speed and be ready before you know it.&lt;/p&gt;

&lt;p&gt;Now that we've launched the splash screen, we just go about our normal business and at the right time launch the main window and tell the splash screen to go away. We'll do this in our Main form class by overriding the OnActivate event:&lt;/p&gt;

&lt;p&gt;protected override void OnActivated(EventArgs e) 
  &lt;br&gt;{ 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; base.OnActivated(e); 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_firstActivated) 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; { 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _firstActivated = false; 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SplashWindow.Current.Hide(this); 

  &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 

  &lt;br&gt;} &lt;/p&gt;

&lt;p&gt;The call here to SplashWindow.Current.Hide passes in the Form derived class of our window. The SplashWindow will keep a reference to this Form object so later in the splash thread it can invoke Activate on the Form class to pop it up after destroying itself. The "_firstActivated" variable is just a boolean set on the Form class and set to true at creation. This prevents us from hiding the splash screen if the main form is activated more than once (can happen).&lt;/p&gt;

&lt;p&gt;And that's it for using the SplashWindow. Simple huh? Here's our splash in action over top of our important business application (another Bil Simser UI Special):&lt;/p&gt;

&lt;p&gt;Splash Window:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_13.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_thumb_5.png" title="image" alt="image" border="0" height="392" width="504"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Main Window with Splash in Front:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_11.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_thumb_4.png" title="image" alt="image" border="0" height="398" width="504"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Ready to work!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_15.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_thumb_6.png" title="image" alt="image" border="0" height="396" width="504"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;One of the other options you can do with this class is to provide it a custom event handler. This is called during the WM_PAINT event and will allow you to get a copy of the Graphics object that the SplashWindow owns (the surface holding the bitmap image you provide) and a Rectangle class of the boundaries of the splash window. This is really handy for doing fancy stuff to your splash screen without having to fuss around with the image itself.&lt;/p&gt;

&lt;p&gt;For example here's the call to our SplashWindow again but using a custom handler:&lt;/p&gt;

&lt;div&gt;
  &lt;div&gt;
    &lt;pre&gt;&lt;span&gt;   1:&lt;/span&gt; [STAThread]&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   2:&lt;/span&gt; &lt;span&gt;private&lt;/span&gt; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; Main()&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   3:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   4:&lt;/span&gt;     SplashWindow.Current.Image = &lt;span&gt;new&lt;/span&gt; Bitmap(&lt;span&gt;typeof&lt;/span&gt;(Form1), &lt;span&gt;"splash.jpg"&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   5:&lt;/span&gt;     SplashWindow.Current.ShowShadow = &lt;span&gt;true&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   6:&lt;/span&gt;     SplashWindow.Current.MinimumDuration = 3000;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   7:&lt;/span&gt;     SplashWindow.Current.SetCustomizer(CustomEventHandler);&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   8:&lt;/span&gt;     SplashWindow.Current.Show();&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  10:&lt;/span&gt;     Application.EnableVisualStyles();&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  11:&lt;/span&gt;     Application.SetCompatibleTextRenderingDefault(&lt;span&gt;false&lt;/span&gt;);&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  12:&lt;/span&gt;     Application.Run(&lt;span&gt;new&lt;/span&gt; Form1());&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  13:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And here's the custom handler. This simply uses the GDI+ function of drawing a string on the Graphics surface. You could use this to display version information from your app, progress messages, etc. without having to build a form and adding labels to it.&lt;/p&gt;

&lt;div&gt;
  &lt;div&gt;
    &lt;pre&gt;&lt;span&gt;   1:&lt;/span&gt; &lt;span&gt;private&lt;/span&gt; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; CustomEventHandler(SplashScreenSurface surface)&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   2:&lt;/span&gt; {&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   3:&lt;/span&gt;     Graphics graphics = surface.Graphics;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   4:&lt;/span&gt;     Rectangle bounds = surface.Bounds;&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   6:&lt;/span&gt;     graphics.DrawString(&lt;span&gt;"Welcome to the Application!"&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   7:&lt;/span&gt;                         &lt;span&gt;new&lt;/span&gt; Font(&lt;span&gt;"Impact"&lt;/span&gt;, 32),&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   8:&lt;/span&gt;                         &lt;span&gt;new&lt;/span&gt; SolidBrush(Color.Red),&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;   9:&lt;/span&gt;                         &lt;span&gt;new&lt;/span&gt; PointF(bounds.Left + 20, bounds.Top + 150));&lt;/pre&gt;

    &lt;pre&gt;&lt;span&gt;  10:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And here's the result:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_9.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/bsimser/WindowsLiveWriter/CreatingaNativeWin32SplashScreen_14FC1/image_thumb_3.png" title="Splash with custom event handler" alt="Splash with custom event handler" border="0" height="396" width="504"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Of course this is pretty simplistic. I would love to see some creative geniuses out there do something cool with this. Since your have the Graphics object (already loaded with the splash screen image) and the GDI+ at your disposal, the sky is the limit. Let me know what you come up with.&lt;/p&gt;

&lt;p&gt;Like I said, this is simple and easy. A few lines of code in your main program to launch it, one line to hide it, and the initialization is just providing it an image to display. All of the code is available for download below in source and binary form. You can just add the SplashLib.dll to your projects and go. Or feel free to enhance it, the code is released under the &lt;a href="http://creativecommons.org/licenses/by-sa/3.0/"&gt;Creative Commons Attribution-Share Alike 3.0 Unported License&lt;/a&gt;. You can share and adapt it (even in commercial work) but please give back to the community.&lt;/p&gt;

&lt;p&gt;One side note, .NET doesn't provide an interface to winuser.h and other Win32 headers so the structures and constants that are needed by SplashWindow to work are in the class. If you're a ReSharper junkie you'll notice that R# complains that the file has a lot of dead code. Don't for the love of all that is holy remove the unused structure members as the SplashWindow will fall down and go boom. &lt;/p&gt;

&lt;p&gt;Of course there's room for improvement so feel free to send me your changes or enhancements!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://download.bilsimser.com/SplashLibSource.rar"&gt;SplashLib Source Files&lt;/a&gt; 

  &lt;br&gt;&lt;a href="http://download.bilsimser.com/SplashLib.rar"&gt;SplashLib Binary Files&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6267715" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/bsimser/archive/2008/06/11/creating-a-native-win32-splash-screen.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6267715</guid>
      <pubDate>Wed, 11 Jun 2008 07:37:00 GMT</pubDate>
    </item>
    <item>
      <title>The Power is released - ReSharper 4.0</title>
      <description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;It has been quite a while, i wrote something usefull here. Main reason is, that i simply dont find time to write blog. I try it, but there is allways something to do. But, this is worth for breaking the stride.&lt;BR&gt;&amp;nbsp; &lt;BR&gt;ReSharper 4.0 &lt;A class="" title="r# 4.0" href="http://www.jetbrains.com/resharper/index.html"&gt;Release Version is out&lt;/A&gt;. JetBrains developed a great product. They waited quite a while, to released new power to the marked. Guess, mainly because they really tested the software to be perfect in use for new .NET frameworks. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;It nice to see, my Visual Studio sidebar is not &lt;STRONG&gt;red&lt;/STRONG&gt; anymore.&lt;BR&gt;&amp;nbsp; &lt;BR&gt;The functionality is listed &lt;A class="" title=Functionality href="http://www.jetbrains.com/resharper/features/"&gt;here&lt;/A&gt; (&lt;STRONG&gt;on the fly error analysis&lt;/STRONG&gt;, &lt;STRONG&gt;removing code redundancies&lt;/STRONG&gt; and more). Shortly, i will write about increasing productivity with ReSharper in Visual Studio. So, stay tuned. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Till then, try it, use it, love it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;A class="" title="R# download link" href="http://www.jetbrains.com/resharper/download/index.html"&gt;Download link&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6267786" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/bojanv/archive/2008/06/11/the-power-is-released-resharper-4-0.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6267786</guid>
      <pubDate>Wed, 11 Jun 2008 08:54:00 GMT</pubDate>
    </item>
    <item>
      <title>Sortie d'ASP.NET MVC Preview 3</title>
      <description>&lt;p&gt;Le mardi 27 Mai est sorti la Preview 3 du framework MVC d'ASP.NET. Scott Guthrie avait parl&amp;#233;, le mois dernier, d'une version interne chez Microsoft qui incluait pas mal de fonctionnalit&amp;#233;s de cette preview. Cette version contient n&amp;#233;anmoins des fonctionnalit&amp;#233;s que celle du mois dernier n'avait pas dont quelques am&amp;#233;liorations et perfectionnement en plus des outils pour Visual Studio 2008.&lt;/p&gt;  &lt;p&gt;Vous pouvez t&amp;#233;l&amp;#233;charger un installeur pour la Preview 3 du framework MVCd'ASP.NET &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=92F2A8F0-9243-4697-8F9A-FCF6BC9F66AB&amp;amp;displaylang=en"&gt;ici&lt;/a&gt;. Vous pouvez &amp;#233;galement t&amp;#233;l&amp;#233;charger les codes sources ainsi que le framework de test unitaires &lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=aspnet&amp;amp;ReleaseId=13792"&gt;ici&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Contr&amp;#244;leur de m&amp;#233;thode d'action&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;La Preview 3 du framework MVC ASP.NET comprend les modifications du contr&amp;#244;leurs qui avaient &amp;#233;t&amp;#233; discut&amp;#233;es et vues dans les sources de la version d'Avril. Il y a tout de m&amp;#234;me eu quelques ajustement.&lt;/p&gt;  &lt;p&gt;Vous pouvez continuer &amp;#224; &amp;#233;crire des m&amp;#233;thodes du contr&amp;#244;leur qui retournent &amp;quot;void&amp;quot; et qui encapsule toute la logique de l'action. Par exemple : &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_2.png"&gt;&lt;img height="152" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb.png" width="742" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Qui rendra le HTML suivant quand on l'ex&amp;#233;cute :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_4.png"&gt;&lt;img height="259" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_1.png" width="730" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;La Preview 3 supporte maintenant une approche o&amp;#249; vous retournerez un objet &amp;quot;ActionResult&amp;quot; qui permet d'indiquer le r&amp;#233;sultat de l'action et d'effectuer un traitement en rapport. Cela va permettre de rendre les tests beaucoup plus facile &amp;#224; r&amp;#233;aliser. Cela va aussi permettre d'avoir une composition plus propre et d'avoir un contr&amp;#244;le sur l'ex&amp;#233;cution.&lt;/p&gt;  &lt;p&gt;Par exemple, nous pourrions utiliser LINQ to SQL avec notre m&amp;#233;thode &amp;quot;Browse&amp;quot; pour r&amp;#233;cup&amp;#233;rer une liste d'objet &amp;quot;Product&amp;quot; de notre base de donn&amp;#233;es et indiquer que nous voulons une vue pour les afficher. Le code suivant passera trois &amp;quot;ViewData&amp;quot; &amp;#224; la vue : &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Title (string) &lt;/li&gt;    &lt;li&gt;CategoryName (string) &lt;/li&gt;    &lt;li&gt;Une liste de &amp;quot;Product&amp;quot; (liste typ&amp;#233;e) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_6.png"&gt;&lt;img height="347" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_2.png" width="745" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Un des avantages d'utiliser l'ActionResult ci-dessus est que cela rend la cr&amp;#233;ation d'un test du contr&amp;#244;leur vraiment simple. Ci-dessous un test qui v&amp;#233;rifie la comportement de notre m&amp;#233;thode &amp;quot;Browse&amp;quot; :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_8.png"&gt;&lt;img height="655" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_3.png" width="828" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Nous pouvons donc cr&amp;#233;er une vue dans le r&amp;#233;pertoire \Views\Products pour afficher la r&amp;#233;ponse en utilisant le &amp;quot;ViewData&amp;quot; qui a &amp;#233;t&amp;#233; initialis&amp;#233; au-dessus :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_10.png"&gt;&lt;img height="696" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_4.png" width="807" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Lorsqu'on se rend sur /Products/Browse/Beverages, on obtient maintenant le r&amp;#233;sultat suivant (les utilisations de ViewData sont entour&amp;#233;es en rouge) :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_12.png"&gt;&lt;img height="678" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_5.png" width="740" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Notez qu'en plus de &amp;quot;ViewResult&amp;quot; (pour indiquer qu'une vue doit &amp;#234;tre affich&amp;#233;e), la Preview 3 du framework MVC d'ASP.NET permet de retourner un &amp;quot;JsonResult&amp;quot; (pour des sc&amp;#233;narios de s&amp;#233;rialisation JSON AJAX),&amp;#160; un &amp;quot;ContentResult&amp;quot; (pour le contenu sans vue) ou encore HttpRedirect et RedirectToAction/Route.&lt;/p&gt;  &lt;p&gt;L'approche ActionResult est extensible (permet de cr&amp;#233;er votre propre type de retour) et vous verrez appara&amp;#238;tre d'autres types de retour dans les prochaines versions.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Am&amp;#233;lioration des m&amp;#233;thodes d'aide HTML&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Les m&amp;#233;thodes d'aides &amp;#224; la manipulation du HTML ont &amp;#233;t&amp;#233; mise &amp;#224; jour dans la Preview 3 du Framework ASP.NET MVC. En plus de quelques bugs qui ont &amp;#233;t&amp;#233; corrig&amp;#233;s, il y a de nouvelles fonctionnalit&amp;#233;s assez utiles.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Lookup automatique&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Dans les pr&amp;#233;c&amp;#233;dentes version de la preview, vous deviez toujours explicitement passer une valeur pour l'afficher &amp;#224; l'aide des Helper HTML. Par exemple, vous proc&amp;#233;diez comme ceci :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_14.png"&gt;&lt;img height="53" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_6.png" width="514" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Vous pouvez toujours proc&amp;#233;der de cette mani&amp;#232;re mais vous avez maintenant la possibilit&amp;#233; de simplifier l'&amp;#233;criture :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_16.png"&gt;&lt;img height="53" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_7.png" width="308" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Les HTML Helper vont maintenant directement rechercher dans le ViewData ou dans le Model avec la clef &amp;quot;ProductName&amp;quot; pour trouver la valeur.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;SelectList et MultiSelectList ViewModels&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;Les nouvelles classe SelectList et MultiSelectList ont &amp;#233;t&amp;#233; inclues pour faciliter la cr&amp;#233;ation de dropdownlist ou multi-listbox HTML (avec la gestion de l'&amp;#233;lement courant etc.). Une approche qui peut &amp;#234;tre utilis&amp;#233;e pour g&amp;#233;n&amp;#233;rer des formulaires de fa&amp;#231;on plus propre. Vous devez, pour cela, d&amp;#233;clarer le nouvel objet et le passer dans le ViewData pour l'afficher dans la vue.&lt;/p&gt;  &lt;p&gt;Par exemple, ci-dessous, nous allons cr&amp;#233;er un objet SelectList avec une liste d'identifiants de cat&amp;#233;gories provenant d'une base de donn&amp;#233;es. Nous indiquons que nous utiliserons &amp;quot;CategoryID&amp;quot; pour la valeur et &amp;quot;CategoryName&amp;quot; pour le texte qui sera affich&amp;#233;. On d&amp;#233;fini &amp;#233;galement l'ID par d&amp;#233;faut :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_18.png"&gt;&lt;img height="324" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_8.png" width="922" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Dans notre vue, nous n'avons besoin que d'utiliser le code suivant pour afficher notre &amp;quot;drop-downlist&amp;quot; avec le SelectList que nous avons d&amp;#233;clarer dans notre ViewData :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_20.png"&gt;&lt;img height="95" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_9.png" width="440" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;A l'ex&amp;#233;cution, cela rendra :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_22.png"&gt;&lt;img height="207" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_10.png" width="333" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_24.png"&gt;&lt;img height="247" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_11.png" width="330" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Les sc&amp;#233;narios de validation ne sont pas encore inclut avec nos HTML Helpers (vous devez &amp;#233;crire votre propre code pour la validation) mais cela sera inclut prochainement pour rendre la cr&amp;#233;ations de pages d'&amp;#233;ditions plus facile.&lt;/p&gt;  &lt;p&gt;Vous devriez voir &amp;#233;galement appara&amp;#238;tre des m&amp;#233;thodes d'aides pour ASP.NET Ajax pour faciliter l'int&amp;#233;gration d'Ajax dans ASP.NET MVC.&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Am&amp;#233;lioration de l'URL Rooting&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;La Preview 3 d'ASP.NET MVC inclue un grand nombre d'am&amp;#233;liorations concernant le syst&amp;#232;me de routage. C'est l'une des fonctionnalit&amp;#233;s les plus essensielles lorsqu'on parle de mod&amp;#232;le MVC, c'est pour cette raison que nous mettons un focus dessus depuis les premi&amp;#232;res versions. Notre nouveau moteur de routage sera d&amp;#233;livr&amp;#233; avec la SP1 du .NET 3.5 cet &amp;#233;t&amp;#233; et supportera le Web Forms et les requ&amp;#234;tes MVC. ASP.NET MVC contiendra &amp;#233;galement sa propre version de la librairie. Vous pourrez donc l'utiliser sur des syst&amp;#232;mes qui n'ont pas le SP1.&lt;/p&gt;  &lt;p&gt;Voici une s&amp;#233;rie d'am&amp;#233;lioration de la Preview 3 :&lt;/p&gt;  &lt;p&gt;&lt;u&gt;Les m&amp;#233;thodes Helpers MapRoute() et IgnoreRoute()&lt;/u&gt;&lt;/p&gt;  &lt;p&gt;On retrouve dans ASP.NET MVC les nouvelles m&amp;#233;thodes d'aide &amp;quot;MapRoute&amp;quot; et &amp;quot;IgnoreRoute&amp;quot; qui peuvent &amp;#234;tre utiliser pour facilit&amp;#233; l'enregistrement de r&amp;#232;gle de routage. MapRoute() permet d'ajouter des r&amp;#232;gles de routage &amp;#224; la collection de Routes tr&amp;#232;s facilement. IgnoreRoute() permet d'indiquer au syst&amp;#232;me de routage d'arr&amp;#234;ter de traiter certain pattern d'URL (par exemple les handler axd, les ressources ASP.NET qui sont utilis&amp;#233;es pour fournir du JavaScript, des images etc.).&lt;/p&gt;  &lt;p&gt;Ci-dessous un exemple de d&amp;#233;monstration dans la m&amp;#233;thode RegisterRoutes du Global.asax :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_26.png"&gt;&lt;img height="302" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_12.png" width="843" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;La m&amp;#233;thode MapRoutes() est surcharg&amp;#233;e&amp;#160; et prend deux, trois ou quatre param&amp;#232;tres (le nom de la r&amp;#232;gle, la syntaxe de l'URL, le param&amp;#232;tre de l'URL par d&amp;#233;faut, et les param&amp;#232;tre d'URL optionnels).&lt;/p&gt;  &lt;p&gt;Vous pouvez appeler MapRoute() autant de fois que vous le voulez pour enregistrer plusieurs r&amp;#232;gles de routages dans le syst&amp;#232;me. Par exemple, en plus des conventions par d&amp;#233;faut, vous pouvez ajouter des r&amp;#232;gles nomm&amp;#233;e comme ci-dessous :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_28.png"&gt;&lt;img height="232" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_13.png" width="861" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On peut explicitement indiquer que vous voulez g&amp;#233;n&amp;#233;rer un lien qui utilise cette r&amp;#232;gles dans votre vue. Par exemple, nous pourrions utiliser Html.RouteLink de la mani&amp;#232;re suivante en passant la cat&amp;#233;gorie &amp;quot;food&amp;quot; comme param&amp;#232;tre &amp;#224; notre contr&amp;#244;leur :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_30.png"&gt;&lt;img height="78" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_14.png" width="778" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160; Ce vue affichera donc un lien qui respecte la r&amp;#232;gles de routage que nous lui avons pass&amp;#233;e avec la cat&amp;#233;gorie et affichera le code HTML suivant :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_32.png"&gt;&lt;img height="64" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_15.png" width="519" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Nous pouvons &amp;#233;galement utiliser Url.RouteUrl(routeName, values) si vous voulons juste r&amp;#233;cup&amp;#233;rer une URL correspondant &amp;#224; une r&amp;#232;gle nomm&amp;#233;e (sans avoir les balises &amp;lt;a&amp;gt; etc.)&lt;/p&gt;  &lt;p&gt;De plus, nous pourrions appeler la m&amp;#233;thode RedirectToRoute(routeName, values) dans notre contr&amp;#244;leur si nous voulions rediriger l'utilisateur en utilisant une r&amp;#232;gle d'URL d&amp;#233;sign&amp;#233;e par &amp;quot;routeName&amp;quot;.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Plus de fonctionnalit&amp;#233; pour le routage&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;La Preview 3 d'ASP.NET MVC supporte &amp;#233;galement toute une s&amp;#233;rie de nouvelles fonctionnalit&amp;#233;s. Vous pouvez maintenant inclure les caract&amp;#232;re &amp;quot;-&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; ,&amp;quot;;&amp;quot; comme part de votre URL.&lt;/p&gt;  &lt;p&gt;Par exemple, utiliser &amp;quot;-&amp;quot; dans l'URL pour facilit&amp;#233; le parsing de la langue et de la localisation :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_34.png"&gt;&lt;img height="165" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_16.png" width="838" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Cela passera les param&amp;#232;tres appropri&amp;#233;s correspondant &amp;#224; la langue, &amp;#224; la localisation et &amp;#224; la cat&amp;#233;gorie au contr&amp;#244;leur.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;u&gt;R&amp;#232;gle&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Exemple&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Param&amp;#232;tres re&amp;#231;us&lt;/u&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;{language}-{locale}/products/browse/{category}&lt;/td&gt;        &lt;td&gt;/en-us/products/browse/food&lt;/td&gt;        &lt;td&gt;language=en, locale=us, category=food&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;/en-uk/products/browse/food&lt;/td&gt;        &lt;td&gt;language=en, locale=uk, category=food&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Vous pouvez &amp;#233;galement utiliser le &amp;quot;.&amp;quot; pour les extensions de fichiers pour savoir quel rendu vous devez afficher (hml, xml, etc.) :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_36.png"&gt;&lt;img height="152" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_17.png" width="827" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;La cat&amp;#233;gorie et le format seront pass&amp;#233; au contr&amp;#244;leur (ProductController.Browse). &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;u&gt;R&amp;#232;gle&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Exemple&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Param&amp;#232;tres re&amp;#231;us&lt;/u&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;products/browse/{category}.{format}&lt;/td&gt;        &lt;td&gt;/products/browse/food.xml&lt;/td&gt;        &lt;td&gt;category=food, format=xml&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;/products/browse/food.html&lt;/td&gt;        &lt;td&gt;category=food, format=html&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;La Preview 3 d'ASP.NET MVC supporte &amp;#233;galement les URL avec du contenu :&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_38.png"&gt;&lt;img height="160" alt="image" src="http://weblogs.asp.net/blogs/scottgufrench/WindowsLiveWriter/SortiedASP.NETMVCPreview3_10783/image_thumb_18.png" width="817" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Cela passera un&amp;#160; param&amp;#232;tre &amp;quot;contentURL&amp;quot; dans notre&amp;#160; m&amp;#233;thode de contr&amp;#244;leur WikiController.DisplayPage.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2"&gt;     &lt;tr&gt;       &lt;td&gt;&lt;u&gt;R&amp;#232;gle&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Exemple&lt;/u&gt;&lt;/td&gt;        &lt;td&gt;&lt;u&gt;Param&amp;#232;tres re&amp;#231;us&lt;/u&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;Wiki/Pages/{*contentUrl}&lt;/td&gt;        &lt;td&gt;/Wiki/Pages/People/Scott&lt;/td&gt;        &lt;td&gt;contentUrl=&amp;quot;People/Scott&amp;quot;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;&amp;#160;&lt;/td&gt;        &lt;td&gt;/Wiki/Pages/Countries/UK&lt;/td&gt;        &lt;td&gt;contentUrl=&amp;quot;Countries/UK&amp;quot;&lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;Ceci est assez utile lorsque vous cr&amp;#233;ez des blogs, cms ou encore des Wiki.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;R&amp;#233;sum&amp;#233;&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;La Preview 3 inclue une lot de nouvelles fonctionnalit&amp;#233;s et de remaniement. Nous commen&amp;#231;ons &amp;#224; voir juste &amp;#224; propos du routage des URL et du mod&amp;#232;le de programmation des contr&amp;#244;leurs. Nous sentons que ces choses commencent &amp;#224; &amp;#234;tre bien. Dans la prochaine version vous verrez appara&amp;#238;tre plus d'am&amp;#233;lioration dans ce qui concerne les vues (html helpers, r&amp;#232;gles de validation, etc.), Ajax, sous contr&amp;#244;leurs, syst&amp;#232;me de login, authentification, autorisations d'acc&amp;#232;s, le cache et le scaffolding des donn&amp;#233;es.&lt;/p&gt;  &lt;p&gt;J'esp&amp;#232;re que cela aide,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.codes-sources.com/loicbar/default.aspx"&gt;Lo&amp;#239;c Bar&lt;/a&gt; - &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx"&gt;Article bas&amp;#233; sur celui de Scott Guthrie&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6267828" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/scottgufrench/archive/2008/06/11/sortie-d-asp-net-mvc-preview-3.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6267828</guid>
      <pubDate>Wed, 11 Jun 2008 09:45:31 GMT</pubDate>
    </item>
    <item>
      <title>Visual Web Developer 2008 Express supporte ASP.NET MVC</title>
      <description>&lt;p&gt;Je viens juste de publier un poste sur la Preview 3 du framework ASP.NET MVC et j'ai oubli&amp;#233; de signaler quelque chose de tout m&amp;#234;me important &amp;#224; propos de cette version : elle est compatible aussi bien avec Visual Studio 2008 qu'avec Visual Web Developer 2008 Express (version gratuite).&lt;/p&gt;  &lt;p&gt;La version SP1 de Visual Web Developer Express supporte maintenant aussi bien les projets de cr&amp;#233;ation de librairies que les projets web (avant, elle ne supportait que les projets web). Cet ajout est tr&amp;#232;s utile lorsque vous voulez utiliser ASP.NET MVC ou encore Silverlight. Si vous installez la version &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx"&gt;SP1 B&amp;#233;ta&lt;/a&gt; de Visual Web Developer Express vous pouvez commencer directement avec la Preview 3 D'ASP.NET MVC.&lt;/p&gt;  &lt;p&gt;Important : ASP.NET MVC Preview 3 ne requi&amp;#232;re pas la SP1 d'install&amp;#233; si vous utilisez Visual Studio 2008. Cette version fonctionnera aussi bien avec Visual Studio 2008 qu'avec VS 2008 SP1.&lt;/p&gt;  &lt;p&gt;Vous pouvez en apprendre plus sur le support d'ASP.NET MVC Preview 3 dans VWD Express sur le blog de la &amp;quot;VS Web Tool team&amp;quot; &lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-preview-3-tooling-updates.aspx"&gt;ici&lt;/a&gt;. Si vous vous rendez sur le lien, vous trouverez &amp;#233;galement un lien de t&amp;#233;l&amp;#233;chargement d'un projet de Test d'ASP.NET MVC qui supporte NUnit. Vous pourrez &amp;#233;videmment utiliser ce projet sur Visual Studio 2008 ou sur Viual Web Developer Express 2008.&lt;/p&gt;  &lt;p&gt;J'esp&amp;#232;re que cela pourra vous aider,&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.codes-sources.com/loicbar/default.aspx"&gt;Lo&amp;#239;c Bar&lt;/a&gt; - &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/06/01/asp-net-mvc-support-with-visual-web-developer-2008-express.aspx"&gt;Article bas&amp;#233; sur celui de Scott Guthrie&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6267878" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/scottgufrench/archive/2008/06/11/visual-web-developer-2008-express-supporte-asp-net-mvc.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6267878</guid>
      <pubDate>Wed, 11 Jun 2008 10:32:51 GMT</pubDate>
    </item>
    <item>
      <title>What Future Update are you looking forward to most?</title>
      <description>There are so many updates coming in the near future, I&amp;#39;d love to hear which one you are most excited about.&amp;#160; I&amp;#39;ll give a brief list here, but feel free to include other things also if you are so inclined. ASP.NET Dynamic Data ASP.NET MVC Read More......(&lt;a href="http://blogs.msdn.com/tom/archive/2008/06/11/what-future-update-are-you-looking-forward-to-most.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6268300" width="1" height="1"&gt;</description>
      <link>http://blogs.msdn.com/tom/archive/2008/06/11/what-future-update-are-you-looking-forward-to-most.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6268300</guid>
      <pubDate>Wed, 11 Jun 2008 11:00:45 GMT</pubDate>
    </item>
    <item>
      <title>Two Loosely Coupled Code - Part 2</title>
      <description>&lt;p&gt;In the  &lt;div class="wlWriterSmartContent" id="scid:605EEA63-B54B-4e6d-A290-F5E9E8229FC1:1f7fba02-bf47-4ecd-9486-68f0a015a9b7"&gt;&lt;/div&gt; I raised the question of "Too loosely coupled design". There's a lot to discuss about it, and I am not going more time on it, except showing one more sample that IMHO shows the benefits and outcomes of the principle being applies, or consequences of not doing so.&lt;/p&gt; &lt;p align="center"&gt;Table 1&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Local.ADL.Home
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomePresenter : IPresenter
  {
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IHomeModel model;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IHomeView view;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; HomePresenter(IHomeView view): 
                        &lt;span class="kwrd"&gt;this&lt;/span&gt;(view, &lt;u&gt;&lt;span class="kwrd"&gt;new&lt;/span&gt; HomeModel()&lt;/u&gt;){}

    &lt;span class="kwrd"&gt;public&lt;/span&gt; HomePresenter(IHomeView view, IHomeModel model)
    {
      &lt;span class="kwrd"&gt;this&lt;/span&gt;.view = view;
      &lt;span class="kwrd"&gt;this&lt;/span&gt;.model = model;
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Initialize()
    {
      view.Load += View_OnLoad;
    }

    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; View_OnLoad(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {
      &lt;span class="kwrd"&gt;if&lt;/span&gt; (!view.IsPostBack)
      {
        view.AssignInitialData(model.IsUserMemberOfPlanAOrPlanB(),
                model.CanShowSomething());
      }
    }
  }
}
&lt;/pre&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }


&lt;p align="center"&gt;Table 2&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Local.ADL.Home
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomeModel : IHomeModel
  {
    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; IsUserMemberOfPlanAOrPlanB()
    {
      &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;u&gt;UserSession.IsPlanAorB&lt;/u&gt;;
    }

    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;bool&lt;/span&gt; CanShowSomething()
    {
      &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;u&gt;UserSession.ShouldSeeSomething&lt;/u&gt;;
    }
  }
}&lt;/pre&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }


&lt;p&gt;&lt;b&gt;Q:&lt;/b&gt; Can HomePresenter be tested based on the code in Table 1?
&lt;p&gt;&lt;b&gt;A:&lt;/b&gt; Yes. It has a parameterized constructor that accepts all dependencies for HomePresenter as contracts (interfaces) without knowing or carrying who are the real components that implement those contracts. Loosely coupled code, where we depend upon abstraction and not concrete implementation.
&lt;p&gt;&lt;b&gt;Q:&lt;/b&gt; Does HomePresenter is loosely coupled at run-time?
&lt;p&gt;&lt;b&gt;A:&lt;/b&gt; No. It has a direct dependency on HomeModel class. This is a tight coupling, meaning that anywhere in the code we used this type of coupling, we made HomeModel "visible" for HomePresenter, i.e. we violated the principle of depending upon abstraction and not concrete implementation. What would be a solution? Dependency Injection Principle with a standard container (lets call it DependencyResolver). Using this simple principle would change the code to be something similar to the code in Table 3. Now HomePresenter is loosely coupled to the implementer of the IHomeModel contract. Some configuration file / startup code will determine who is the actual implementer at run-time. Testing is still possible.
&lt;p align="center"&gt;Table 3&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Local.ADL.Home
{
  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; HomePresenter : IPresenter
  {
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IHomeModel model;
    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;readonly&lt;/span&gt; IHomeView view;

    &lt;span class="kwrd"&gt;public&lt;/span&gt; HomePresenter(IHomeView view): 
       &lt;span class="kwrd"&gt;this&lt;/span&gt;(view, &lt;u&gt;DependencyResolver.GetImplementerOf(IHomeModel)&lt;/u&gt;){}

    &lt;span class="kwrd"&gt;public&lt;/span&gt; HomePresenter(IHomeView view, IHomeModel model)
    {
      &lt;span class="kwrd"&gt;this&lt;/span&gt;.view = view;
      &lt;span class="kwrd"&gt;this&lt;/span&gt;.model = model;
    }

    &lt;span class="rem"&gt;// ...&lt;/span&gt;
&lt;/pre&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }


&lt;p&gt;&lt;b&gt;Q:&lt;/b&gt; Can HomeModel be tested based on the code in Table 2? 
&lt;p&gt;&lt;b&gt;A:&lt;/b&gt; No. It is tightly coupled to the UserSession, which in its' case is a static class and cannot be mocked / faked / taken out as a component that is not required to be tested at this moment.
&lt;p&gt;To solve it:
&lt;ul&gt;
&lt;li&gt;UserSession has to be implementer of a contract, lets call it IUserSession&lt;/li&gt;
&lt;li&gt;The implementer of IUserSession has to be supplied / injected as a dependency during construction time either directly or through container, similar to the example in HomePresenter code in Table 3&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6268413" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/sfeldman/archive/2008/06/11/two-loosely-coupled-code-part-2.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6268413</guid>
      <pubDate>Wed, 11 Jun 2008 16:15:40 GMT</pubDate>
    </item>
    <item>
      <title>A new way to Upgrade DotNetNuke</title>
      <description>If you've ever had me as an instructor for a DotNetNuke class , or heard me present at a user group or conference you've likely heard me say that I always use the DotNetNuke Install package when performing upgrades on my DNN sites. I rarely use the Upgrade package, the main reason for this WAS that the upgrade package came without a web.config file being defined. The ease of the upgrade package was that you could just extract it directly over your existing site and things would upgrade, the problem...(&lt;a href="http://weblogs.asp.net/christoc/archive/2008/06/11/a-new-way-to-upgrade-dotnetnuke.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6268526" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/christoc/archive/2008/06/11/a-new-way-to-upgrade-dotnetnuke.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6268526</guid>
      <pubDate>Wed, 11 Jun 2008 17:25:00 GMT</pubDate>
    </item>
    <item>
      <title>Creating Captcha Images Using The GD Library</title>
      <description>&lt;P&gt;I have found a random PHP script for creating captcha images using the GD Library and I've converted it to C# as promised in my previous blog post. I learned something new on this project. The first color in a new image will be the background color but only if the image is not using TrueColor. &lt;/P&gt;
&lt;P&gt;I have to admit that this is just an idle exercise. I have no real need for this. I waste a lot of time on idle exercises, although sometimes previous research is useful later on. I think I need to be more focused on billable client work and creative work. One of the major pitfalls of intellect is that a very intelligent person is inclined to waste considerable time on pointless intellectual exercises, i.e abstractions. I think this is a trap that many IT professionals fall into because it is easy to get lost in technical details that serve no purpose. For example, how often do you find yourself struggling to install something on Linux which you are never going to use?&lt;/P&gt;
&lt;P&gt;I have a list of some other idle exercises I was considering but I should probably focus on something else:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Querying Index Server catalog using ASP.NET, maybe using LINQ. Like, why bother?&lt;/LI&gt;
&lt;LI&gt;Querying Active Directory using ASP.NET with LINQ. What for?&lt;/LI&gt;
&lt;LI&gt;Write an ASP.NET page using COBOL. This might be worthwhile if only to horrify other developers. &lt;/LI&gt;&lt;/OL&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;   1:&lt;/SPAN&gt; &amp;lt;%@ WebHandler Language=&lt;SPAN&gt;"C#"&lt;/SPAN&gt; Class=&lt;SPAN&gt;"CaptchaImages"&lt;/SPAN&gt; %&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   2:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   3:&lt;/SPAN&gt; &lt;SPAN&gt;/*&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   4:&lt;/SPAN&gt; &lt;SPAN&gt;* File: CaptchaImages.ashx&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   5:&lt;/SPAN&gt; &lt;SPAN&gt;* Author: Simon Jarvis&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   6:&lt;/SPAN&gt; &lt;SPAN&gt;* Copyright: 2006 Simon Jarvis&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   7:&lt;/SPAN&gt; &lt;SPAN&gt;* Date: 03/08/06&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   8:&lt;/SPAN&gt; &lt;SPAN&gt;* Updated: 07/02/07&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;   9:&lt;/SPAN&gt; &lt;SPAN&gt;* Requirements: PHP 4/5 with GD and FreeType libraries&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  10:&lt;/SPAN&gt; &lt;SPAN&gt;* Link: http://www.white-hat-web-design.co.uk/articles/php-captcha.php&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  11:&lt;/SPAN&gt; &lt;SPAN&gt;* &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  12:&lt;/SPAN&gt; &lt;SPAN&gt;* This program is free software; you can redistribute it and/or &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  13:&lt;/SPAN&gt; &lt;SPAN&gt;* modify it under the terms of the GNU General Public License &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  14:&lt;/SPAN&gt; &lt;SPAN&gt;* as published by the Free Software Foundation; either version 2 &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  15:&lt;/SPAN&gt; &lt;SPAN&gt;* of the License, or (at your option) any later version.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  16:&lt;/SPAN&gt; &lt;SPAN&gt;* &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  17:&lt;/SPAN&gt; &lt;SPAN&gt;* This program is distributed in the hope that it will be useful, &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  18:&lt;/SPAN&gt; &lt;SPAN&gt;* but WITHOUT ANY WARRANTY; without even the implied warranty of &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  19:&lt;/SPAN&gt; &lt;SPAN&gt;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  20:&lt;/SPAN&gt; &lt;SPAN&gt;* GNU General Public License for more details: &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  21:&lt;/SPAN&gt; &lt;SPAN&gt;* http://www.gnu.org/licenses/gpl.html&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  22:&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  23:&lt;/SPAN&gt; &lt;SPAN&gt; * C# Version for ASP.NET&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  24:&lt;/SPAN&gt; &lt;SPAN&gt; * Author: Robert S. Robbins&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  25:&lt;/SPAN&gt; &lt;SPAN&gt; * Modified: 06/10/08&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  26:&lt;/SPAN&gt; &lt;SPAN&gt; * Requirements: ASP.NET 2.0 with GD-Sharp&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  27:&lt;/SPAN&gt; &lt;SPAN&gt;*/&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  28:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  29:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  30:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System.Web;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  31:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System.Diagnostics;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  32:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System.Collections;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  33:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System.IO;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  34:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; System.Drawing;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  35:&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; Ntx.GD;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  36:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  37:&lt;/SPAN&gt; &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;class&lt;/SPAN&gt; CaptchaImages : IHttpHandler {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  38:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  39:&lt;/SPAN&gt;     &lt;SPAN&gt;private&lt;/SPAN&gt; &lt;SPAN&gt;string&lt;/SPAN&gt; font_file = &lt;SPAN&gt;@"C:\\WINDOWS\\Fonts\\bauhs93.ttf"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  40:&lt;/SPAN&gt;     &lt;SPAN&gt;private&lt;/SPAN&gt; &lt;SPAN&gt;string&lt;/SPAN&gt; font_name = &lt;SPAN&gt;"Bauhaus 93"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  41:&lt;/SPAN&gt;     &lt;SPAN&gt;private&lt;/SPAN&gt; &lt;SPAN&gt;string&lt;/SPAN&gt; mime_type = &lt;SPAN&gt;"image/jpeg"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  42:&lt;/SPAN&gt;     &lt;SPAN&gt;private&lt;/SPAN&gt; &lt;SPAN&gt;bool&lt;/SPAN&gt; transparent_background = &lt;SPAN&gt;true&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  43:&lt;/SPAN&gt;     &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  44:&lt;/SPAN&gt;     &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;void&lt;/SPAN&gt; ProcessRequest (HttpContext context) {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  45:&lt;/SPAN&gt;         &lt;SPAN&gt;// create trace listener file for debugging purposes&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  46:&lt;/SPAN&gt;         System.IO.Stream objFile = System.IO.File.Create(&lt;SPAN&gt;@"C:\Inetpub\wwwroot\study\App_Data\trace2.txt"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  47:&lt;/SPAN&gt;         TextWriterTraceListener objTextListener = &lt;SPAN&gt;new&lt;/SPAN&gt; TextWriterTraceListener(objFile);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  48:&lt;/SPAN&gt;         Trace.Listeners.Add(objTextListener);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  49:&lt;/SPAN&gt;         Trace.AutoFlush = &lt;SPAN&gt;true&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  50:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  51:&lt;/SPAN&gt;         GD image = CaptchaSecurityImage(120, 40, 6);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  52:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  53:&lt;/SPAN&gt;         &lt;SPAN&gt;/* output captcha image to browser */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  54:&lt;/SPAN&gt;         context.Response.ContentType = mime_type;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  55:&lt;/SPAN&gt;         MemoryStream ms = &lt;SPAN&gt;new&lt;/SPAN&gt; MemoryStream();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  56:&lt;/SPAN&gt;         image.Save(GD.FileType.Jpeg, ms);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  57:&lt;/SPAN&gt;         &lt;SPAN&gt;byte&lt;/SPAN&gt;[] binary = ms.ToArray();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  58:&lt;/SPAN&gt;         context.Response.BinaryWrite(binary);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  59:&lt;/SPAN&gt;         context.Response.Flush();        &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  60:&lt;/SPAN&gt;         &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  61:&lt;/SPAN&gt;         Trace.Close();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  62:&lt;/SPAN&gt;         Trace.Flush();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  63:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  64:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  65:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  66:&lt;/SPAN&gt;     &lt;SPAN&gt;/// Generates a random code with the specified number of characters.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  67:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  68:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;param name="characters"&amp;gt;The number of characters to generate.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  69:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;returns&amp;gt;A random code.&amp;lt;/returns&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  70:&lt;/SPAN&gt;     &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;string&lt;/SPAN&gt; generateCode(&lt;SPAN&gt;int&lt;/SPAN&gt; characters) &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  71:&lt;/SPAN&gt;     {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  72:&lt;/SPAN&gt;         &lt;SPAN&gt;/* list all possible characters, similar looking characters and vowels have been removed */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  73:&lt;/SPAN&gt;         &lt;SPAN&gt;string&lt;/SPAN&gt; possible = &lt;SPAN&gt;"23456789bcdfghjkmnpqrstvwxyz"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  74:&lt;/SPAN&gt;         &lt;SPAN&gt;string&lt;/SPAN&gt; code = &lt;SPAN&gt;""&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  75:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt; i = 0;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  76:&lt;/SPAN&gt;         Random random = &lt;SPAN&gt;new&lt;/SPAN&gt; Random();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  77:&lt;/SPAN&gt;         &lt;SPAN&gt;while&lt;/SPAN&gt; (i &amp;lt; characters)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  78:&lt;/SPAN&gt;         {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  79:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumber = random.Next(0, possible.Length);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  80:&lt;/SPAN&gt;             Trace.WriteLine(intRandomNumber.ToString(), &lt;SPAN&gt;"intRandomNumber"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  81:&lt;/SPAN&gt;             code += possible.Substring(intRandomNumber, 1);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  82:&lt;/SPAN&gt;             i++;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  83:&lt;/SPAN&gt;         }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  84:&lt;/SPAN&gt;         &lt;SPAN&gt;return&lt;/SPAN&gt; code;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  85:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  86:&lt;/SPAN&gt;     &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  87:&lt;/SPAN&gt;     &lt;SPAN&gt;public&lt;/SPAN&gt; GD CaptchaSecurityImage(&lt;SPAN&gt;int&lt;/SPAN&gt; width, &lt;SPAN&gt;int&lt;/SPAN&gt; height, &lt;SPAN&gt;int&lt;/SPAN&gt; characters)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  88:&lt;/SPAN&gt;     {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  89:&lt;/SPAN&gt;         &lt;SPAN&gt;string&lt;/SPAN&gt; code = generateCode(characters);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  90:&lt;/SPAN&gt;         &lt;SPAN&gt;/* font size will be 75% of the image height */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  91:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt; font_size = Convert.ToInt32(height * 0.75);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  92:&lt;/SPAN&gt;         &lt;SPAN&gt;// This is the equivalent of calling ImageCreate&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  93:&lt;/SPAN&gt;         GD image = &lt;SPAN&gt;new&lt;/SPAN&gt; GD(width, height, &lt;SPAN&gt;false&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  94:&lt;/SPAN&gt;         &lt;SPAN&gt;/* set the colours */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  95:&lt;/SPAN&gt;         &lt;SPAN&gt;/* The first color in a new image should be the background color&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  96:&lt;/SPAN&gt; &lt;SPAN&gt;         * but it requires trueColor to be set to false*/&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  97:&lt;/SPAN&gt;         GDColor background_color = image.ColorAllocate(255, 255, 255);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  98:&lt;/SPAN&gt;         GDColor text_color = image.ColorAllocate(20, 40, 100);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;  99:&lt;/SPAN&gt;         GDColor noise_color = image.ColorAllocate(100, 120, 180);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 100:&lt;/SPAN&gt;         Random random = &lt;SPAN&gt;new&lt;/SPAN&gt; Random();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 101:&lt;/SPAN&gt;         &lt;SPAN&gt;/* generate random dots in background */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 102:&lt;/SPAN&gt;         &lt;SPAN&gt;for&lt;/SPAN&gt; (&lt;SPAN&gt;int&lt;/SPAN&gt; i = 0; i &amp;lt; (width * height) / 3; i++)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 103:&lt;/SPAN&gt;         {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 104:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberX = random.Next(0, width);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 105:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberY = random.Next(0, height);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 106:&lt;/SPAN&gt;             image.FilledEllipse(intRandomNumberX, intRandomNumberY, 2, 2, noise_color);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 107:&lt;/SPAN&gt;         }       &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 108:&lt;/SPAN&gt;         &lt;SPAN&gt;/* generate random lines in background */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 109:&lt;/SPAN&gt;         &lt;SPAN&gt;for&lt;/SPAN&gt; (&lt;SPAN&gt;int&lt;/SPAN&gt; i = 0; i &amp;lt; (width * height) / 150; i++)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 110:&lt;/SPAN&gt;         {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 111:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberX = random.Next(0, width);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 112:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberY = random.Next(0, height);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 113:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberX2 = random.Next(0, width);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 114:&lt;/SPAN&gt;             &lt;SPAN&gt;int&lt;/SPAN&gt; intRandomNumberY2 = random.Next(0, height);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 115:&lt;/SPAN&gt;             image.Line(intRandomNumberX, intRandomNumberY, intRandomNumberX2, intRandomNumberY2, noise_color);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 116:&lt;/SPAN&gt;         }          &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 117:&lt;/SPAN&gt;         &lt;SPAN&gt;/* create textbox and add text */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 118:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt;[] textbox = ImageTTFBBox(font_name, font_size, code);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 119:&lt;/SPAN&gt;         &lt;SPAN&gt;// bounding rectangle&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 120:&lt;/SPAN&gt;         ArrayList br = &lt;SPAN&gt;new&lt;/SPAN&gt; ArrayList();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 121:&lt;/SPAN&gt;         br.Add(&lt;SPAN&gt;new&lt;/SPAN&gt; Ntx.GD.Point(0, 0));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 122:&lt;/SPAN&gt;         br.Add(&lt;SPAN&gt;new&lt;/SPAN&gt; Ntx.GD.Point(textbox[0], 0));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 123:&lt;/SPAN&gt;         br.Add(&lt;SPAN&gt;new&lt;/SPAN&gt; Ntx.GD.Point(textbox[0], textbox[1]));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 124:&lt;/SPAN&gt;         br.Add(&lt;SPAN&gt;new&lt;/SPAN&gt; Ntx.GD.Point(0, textbox[1]));&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 125:&lt;/SPAN&gt;         &lt;SPAN&gt;/* font size will be 75% of the image height */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 126:&lt;/SPAN&gt;         font_size = Convert.ToInt32(textbox[1] * 0.75);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 127:&lt;/SPAN&gt;         &lt;SPAN&gt;// This is the equivalent of calling ImageTTFText&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 128:&lt;/SPAN&gt;         &lt;SPAN&gt;string&lt;/SPAN&gt; result = image.StringFT(br, text_color, font_file, font_size, 0, 0, font_size, code, &lt;SPAN&gt;true&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 129:&lt;/SPAN&gt;         Trace.WriteLine(result, &lt;SPAN&gt;"result"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 130:&lt;/SPAN&gt;         &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 131:&lt;/SPAN&gt;         &lt;SPAN&gt;// set transparency&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 132:&lt;/SPAN&gt;         &lt;SPAN&gt;if&lt;/SPAN&gt; (transparent_background)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 133:&lt;/SPAN&gt;         {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 134:&lt;/SPAN&gt;             image.ColorTransparent(background_color);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 135:&lt;/SPAN&gt;         }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 136:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 137:&lt;/SPAN&gt;         &lt;SPAN&gt;return&lt;/SPAN&gt; image;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 138:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 139:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 140:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 141:&lt;/SPAN&gt;     &lt;SPAN&gt;/// Give the bounding box of a text using TrueType fonts&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 142:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;/summary&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 143:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;param name="font"&amp;gt;The name of a TTF font.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 144:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;param name="size"&amp;gt;The size of the font.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 145:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;param name="text"&amp;gt;The text to be displayed using the font.&amp;lt;/param&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 146:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;returns&amp;gt;An integer array containing the height and width.&amp;lt;/returns&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 147:&lt;/SPAN&gt;     &lt;SPAN&gt;/// &amp;lt;remarks&amp;gt;Not exactly the same as the original function, but the best we can do.&amp;lt;/remarks&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 148:&lt;/SPAN&gt;     &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;int&lt;/SPAN&gt;[] ImageTTFBBox(&lt;SPAN&gt;string&lt;/SPAN&gt; font, &lt;SPAN&gt;int&lt;/SPAN&gt; size, &lt;SPAN&gt;string&lt;/SPAN&gt; text)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 149:&lt;/SPAN&gt;     {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 150:&lt;/SPAN&gt;         Bitmap objBmpImage = &lt;SPAN&gt;new&lt;/SPAN&gt; Bitmap(1, 1);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 151:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 152:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt; intWidth = 0;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 153:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt; intHeight = 0;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 154:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 155:&lt;/SPAN&gt;         System.Drawing.Font objFont = &lt;SPAN&gt;new&lt;/SPAN&gt; System.Drawing.Font(font, size, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 156:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 157:&lt;/SPAN&gt;         &lt;SPAN&gt;// Create a graphics object to measure the text's width and height.  &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 158:&lt;/SPAN&gt;         Graphics objGraphics = Graphics.FromImage(objBmpImage);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 159:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 160:&lt;/SPAN&gt;         &lt;SPAN&gt;// Determine the bitmap size.  &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 161:&lt;/SPAN&gt;         &lt;SPAN&gt;/* Need to multiply the width by 2.0. &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 162:&lt;/SPAN&gt; &lt;SPAN&gt;         * This is an ugly hack.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 163:&lt;/SPAN&gt; &lt;SPAN&gt;         * The System.Drawing width will not match the GD Library drawing width.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 164:&lt;/SPAN&gt; &lt;SPAN&gt;         */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 165:&lt;/SPAN&gt;         intWidth = Convert.ToInt32(objGraphics.MeasureString(text, objFont).Width * 2.0);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 166:&lt;/SPAN&gt;         intHeight = Convert.ToInt32(objGraphics.MeasureString(text, objFont).Height);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 167:&lt;/SPAN&gt;         Trace.WriteLine(intWidth.ToString(), &lt;SPAN&gt;"intWidth"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 168:&lt;/SPAN&gt;         Trace.WriteLine(intHeight.ToString(), &lt;SPAN&gt;"intHeight"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 169:&lt;/SPAN&gt;         &lt;SPAN&gt;int&lt;/SPAN&gt;[] box = { intWidth, intHeight };&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 170:&lt;/SPAN&gt;         &lt;SPAN&gt;return&lt;/SPAN&gt; box;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 171:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 172:&lt;/SPAN&gt;  &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 173:&lt;/SPAN&gt;     &lt;SPAN&gt;public&lt;/SPAN&gt; &lt;SPAN&gt;bool&lt;/SPAN&gt; IsReusable {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 174:&lt;/SPAN&gt;         get {&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 175:&lt;/SPAN&gt;             &lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 176:&lt;/SPAN&gt;         }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 177:&lt;/SPAN&gt;     }&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 178:&lt;/SPAN&gt;&amp;nbsp; &lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt; 179:&lt;/SPAN&gt; }&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6268587" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/rrobbins/archive/2008/06/11/creating-captcha-images-using-gd-library.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6268587</guid>
      <pubDate>Wed, 11 Jun 2008 18:16:00 GMT</pubDate>
    </item>
    <item>
      <title>VC++ CRT vs OS CRT</title>
      <description>Read &lt;A class="" href="http://kobyk.wordpress.com/2007/07/20/dynamically-linking-with-msvcrtdll-using-visual-c-2005/"&gt;this excellent blog post&lt;/A&gt; about how to link the OS CRT (C Runtime Library) instead of the ever changing VC++ CRT.&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8567116" width="1" height="1"&gt;</description>
      <link>http://blogs.msdn.com/mapo/archive/2008/05/31/vc-crt-vs-os-crt.aspx</link>
      <source url="http://blogs.msdn.com/default.aspx">MSDN Blogs</source>
      <guid isPermaLink="False">91d46819-8472-40ad-a661-2c78acb4018c:8567116</guid>
      <pubDate>Sat, 31 May 2008 22:09:00 GMT</pubDate>
    </item>
    <item>
      <title>Unit testing vs. Integration Testing : The Restaurant Analogy</title>
      <description>&lt;p&gt;Here's an analogy I came up with to explain the difference between unit tests and integration tests.&lt;/p&gt;  &lt;p&gt;Imagine going to a restaurant with a bunch of your friends. there are some couples there as well as singles. At the end of the meal, it is time to pay. Unit testing is like giving a separate bill to each couple or single. Each person knows only what they needs to pay as well as tip, but do not care what anyone else had, or what the total meal amount is. as long as they pay what they need, they can go home peacefully.&lt;/p&gt;  &lt;p&gt;Integration testing is like giving one big check to the group, with everyone having to calculate on their own how much they need to pay. sometimes everyone things they are good, but in the end the total amount may be too high or too low. There is a lot of interaction going on to decide who pays for what and who has already paid.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6238265" width="1" height="1"&gt;</description>
      <link>http://weblogs.asp.net/rosherove/archive/2008/05/31/unit-testing-vs-integration-testing-the-restaurant-analogy.aspx</link>
      <source url="http://weblogs.asp.net/">ASP.NET Weblogs</source>
      <guid isPermaLink="False">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6238265</guid>
      <pubDate>Sat, 31 May 2008 20:12:31 GMT</pubDate>
    </item>
    <item>
      <title>�Sab�a que. puede accede la barra de herramienatas desde una ventana del IDE?</title>
      <description>&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;A href="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.Howtoaccessatoolbarwithinatoolwindow_11E31/ToobarsInToolWindows_2.jpg"&gt;&lt;IMG border=0 alt=ToobarsInToolWindows align=left src="http://blogs.msdn.com/blogfiles/saraford/WindowsLiveWriter/Did.Howtoaccessatoolbarwithinatoolwindow_11E31/ToobarsInToolWindows_thumb.jpg" width=192 height=137&gt;&lt;/A&gt;Probablemente se ha dado cuenta que dentro de ciertas ventanas, como el Explorador de soluciones (Solution Explorer), no puede acceder la barra de herramientas utilizando las &lt;B&gt;Teclas de direcci�n&lt;/B&gt; o &lt;B&gt;Tab&lt;/B&gt;.&amp;nbsp;Para acceder la barra de herramientas de este tipo de ventana utilizando el acceso directo del &lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;teclado, debe marcar &lt;B&gt;May�s + Alt&lt;/B&gt; (&lt;B&gt;Shift + Alt) &lt;/B&gt;&lt;SPAN&gt;en esta orden&lt;/SPAN&gt;.&amp;nbsp; Alt+ May�s (Alt + Shift) no funcionar�.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Contenido sindicado de&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="http://blogs.msdn.com/saraford/"&gt;&lt;SPAN&gt;Sara Ford's Weblog&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;SPAN&gt;Traducci�n autorizada por Sara Ford.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8566909" width="1" height="1"&gt;</description>
      <link>http://blogs.msdn.com/andygon/archive/2008/05/31/sab-a-que-puede-accede-la-barra-de-herramienatas-desde-una-ventana-del-ide.aspx</link>
      <source url="http://blogs.msdn.com/default.aspx">MSDN Blogs</source>
      <guid isPermaLink="False">91d46819-8472-40ad-a661-2c78acb4018c:8566909</guid>
      <pubDate>Sat, 31 May 2008 18:25:00 GMT</pubDate>
    </item>
    <item>
      <title>How to make 20% of your time?</title>
      <description>&lt;p&gt;I heard once that a company allows for their employees to use 20% of their time to work on whatever project they like!&lt;/p&gt;  &lt;p&gt;Well that is definitely true in kindergarten they give you a lot of time to use it on whatever project you want and everybody will be very supportive :).&lt;/p&gt;  &lt;p&gt;However when it comes to an actual organization it is very hard to see employees not aligned with their company objectives or just coming up with ideas that make no sense. It is not even healthy for an organization to have very super smart guys and that's it. Even I think in my own opinion there should be a mix of very smart and average smart people in order to be successful or else you will have team members quarreling on who has the smartest idea :), and I guess I am one of those average smart guys.&lt;/p&gt;  &lt;p&gt;Anyway that's not the point, but the idea is you don't need to work at a company just because they let you do what you want for 20% of the time, because at Microsoft actually I do that and still do my job. Well I don't use 20% of my time doing projects that doesn't align with my team vision, but at least I find something that would be a win for my organization and a win for me. &lt;/p&gt;  &lt;p&gt;Microsoft is one huge diverse organization, where each team has his own unique culture but at the same time they inherit some from the great culture of the whole company. I love the fact that you are the owner of your destiny at the company and you can shape your own future if you have the passion to do so.&lt;/p&gt;  &lt;p&gt;So How can you save 20% of your time? Well first you need to organize your time very well and this is a key to making sure you have 20% of your time to use at projects that fuels your aspirations in technology.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. First start by planning your week.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Every Monday I come to office and first thing I do is to create a Task in Outlook and I basically like to call it by week number &amp;quot;21/2008&amp;quot; and there I categorize the work I need to do. Well I put everything even the stuff I want to research and explore. I sometimes find no time to do all that stuff so I make sure I plan for the highest priority work first. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;2. Make sure you actually look at your weekly plan every day&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The key to successfully acting on a plan is to monitor it. Everyday open your weekly plan, update it with information and make sure you work on the items you have identified. Well sometimes I was just wondering at my office after long day of meetings and asking my self what should be doing? Well then I open my weekly plan :)&lt;/p&gt;  &lt;p&gt;It really helps out to have this kind of planning during the week, just a simple task in outlook that you can look at every day to make sure you're on the right track.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. Make a reminder at the end of the week and measure your performance.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;At the end of each week this task has a reminder. I take a look at my week and see what I have or haven't achieved, and start planning the next week if possible. Sometimes I find my self swamped with work that I couldn't deliver so I make sure that doesn't happen the week after. Continuously learning from your weekly plans really excels your ability to accurately plan and estimate your abilities to complete your work.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;4. Submit your weekly report if you have to.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Usually I like to have a weekly report even if my manager didn't ask for it. Oops I actually forgot mine this week:). &lt;/p&gt;  &lt;p&gt;Having those weekly reports really helps when you go out to your review and say hmmm what have I actually done during the year :). It also helps to provide visibility at what you have been working on.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;5. Measure how successful you were on achieving your plans at the end of the year.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Well I actually have a task in outlook called FY08, which I measure against the full year. I then say have I done what I was planning for my self in FY08? well it is really so rewarding when you find that you have achieved all your objectives and even more because you planned to do so.&lt;/p&gt;  &lt;p&gt;The planning process of my time helped me actually save 20% of my time and sometimes more to work on projects that would benefit me and my organization. I can't say it was 100% perfect, cause sometimes I investigated technologies that weren't even related to my work, but lets say I still enjoyed it, and it pays off later.&lt;/p&gt;  &lt;p&gt;So it doesn't need to be stated in the company employee handbook that you can use 20% of your time on anything, you can actually make it happen at Microsoft just with the right set of time planning activities and definitely a manager who understands. &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8566958" width="1" height="1"&gt;</description>
      <link>http://blogs.msdn.com/akramhussein/archive/2008/05/31/how-to-make-20-of-your-time.aspx</link>
      <source url="http://blogs.msdn.com/default.aspx">MSDN Blogs</source>
      <guid isPermaLink="False">91d46819-8472-40ad-a661-2c78acb4018c:8566958</guid>
      <pubDate>Sat, 31 May 2008 19:12:59 GMT</pubDate>
    </item>
    <item>
      <title>Socket Server? do it with Windows Live Messenger Library</title>
      <description>&lt;p&gt;I met &lt;a href="http://www.cynergysystems.com/blogs/page/josefajardo"&gt;Jose from Cynergy Systems&lt;/a&gt; when I was in Sydney and now there is a video of one of his demos out.&lt;/p&gt;  &lt;p&gt;He basically built his own socket server to push the coordinates of the mouse in a Deep Zoom image to another machine, using Windows Live Messenger Library he could have used our infrastructure to do this (and chats about that option w/ the &lt;a&gt;Delicate Genius&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;He talks about it ~ 7 mins in.&lt;/p&gt;  &lt;p align="center"&gt;&lt;/p&gt;  &lt;p&gt;Jose has also been working on some secret stuff and it should be out some time soonish - i'll release the video I shot with him when it comes out - click on the frame below to his warning.&lt;/p&gt;  &lt;p align="center"&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8566843" width="1" height="1"&gt;</description>
      <link>http://blogs.msdn.com/angus_logan/archive/2008/06/01/socket-server-do-it-with-windows-live-messenger-library.aspx</link>
      <source url="http://blogs.msdn.com/default.aspx">MSDN Blogs</source>
      <guid isPermaLink="False">91d46819-8472-40ad-a661-2c78acb4018c:8566843</guid>
      <pubDate>Sat, 31 May 2008 17:31:48 GMT</pubDate>
    </item>
    <item>
      <title>Taking Advantage of Vim</title>
      <description>&lt;p&gt;Once you have mastered &lt;a href="http://blogs.msdn.com/steverowe/archive/2008/05/24/gvim-as-notepad.aspx"&gt;using Vim to replace Notepad.exe&lt;/a&gt;, it is time to starting taking advantage of what Vim has to offer.&amp;nbsp; Doing so can increase your productivity.&amp;nbsp; Below are most of the commands I use most frequently.&amp;nbsp; It is important to note that Vim has a veritable cornucopia of &lt;a href="http://www.vim.org/htmldoc/quickref.html"&gt;commands&lt;/a&gt; and thus supports many different usage styles.&amp;nbsp; What is presented here are just a fraction of the available commands.&lt;/p&gt; &lt;p&gt;Many commands in Vim have a similar format.&amp;nbsp; This format is [repetitions][command][movement].&amp;nbsp; For instance, 2dw will delete the next 2 words.&lt;/p&gt; &lt;p&gt;Useful commands that take this format include:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;Command&lt;/td&gt; &lt;td&gt;Action&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;c&lt;/td&gt; &lt;td&gt;Change.&amp;nbsp; Delete the text moved over and enter insert mode.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;d&lt;/td&gt; &lt;td&gt;Delete.&amp;nbsp; Delete the text moved over.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;y&lt;/td&gt; &lt;td&gt;Yank.&amp;nbsp; Copy the text moved over.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;No number implies 1.&amp;nbsp; The combination cw will delete the rest of the word under the cursor and enter insert mode.&amp;nbsp; This is probably the most commonly used combination for me.&lt;/p&gt; &lt;p&gt;There are two more variants on these commands.&amp;nbsp; A capital letter will execute the command to the end of the line.&amp;nbsp; D will thus delete the rest of the line.&amp;nbsp; Two repeated letters will execute the command on the entire line.&amp;nbsp; Thus cc changes the whole line and 2yy yanks the next 2 lines.&lt;/p&gt; &lt;p&gt;Common movement commands include:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;Movement&lt;/td&gt; &lt;td&gt;Action&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;w&lt;/td&gt; &lt;td&gt;word.&amp;nbsp; A single word.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;b&lt;/td&gt; &lt;td&gt;word back.&amp;nbsp; A single word, backward.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;)&lt;/td&gt; &lt;td&gt;sentence.&amp;nbsp; A single sentence.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;h&lt;/td&gt; &lt;td&gt;left.&amp;nbsp; One character to the left.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;j&lt;/td&gt; &lt;td&gt;down.&amp;nbsp; One line below.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;k&lt;/td&gt; &lt;td&gt;up.&amp;nbsp; One line up.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;l&lt;/td&gt; &lt;td&gt;right.&amp;nbsp; One character to the right.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;Movements can be issued without a command in front of them.&amp;nbsp; 2w will move the cursor 2 words to the right.&amp;nbsp; You can maneuver all over the document using hjkl instead of the cursor keys if you like.&amp;nbsp; Personally, I use the cursor keys and only use l when I want to change some number of characters.&amp;nbsp; 5cl will delete 5 characters and enter insert mode.&lt;/p&gt; &lt;p&gt;Some commands operate without a movement.&amp;nbsp; These include:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;Command&lt;/td&gt; &lt;td&gt;Action&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;x&lt;/td&gt; &lt;td&gt;Delete one character&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;~&lt;/td&gt; &lt;td&gt;Change the case of one character.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;r&lt;/td&gt; &lt;td&gt;Change one letter and return to normal mode.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;These commands can accept a number.&amp;nbsp; Thus 5x will delete the next 5 characters.&lt;/p&gt; &lt;p&gt;Other useful commands:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;:&amp;lt;line number&amp;gt;&lt;/td&gt; &lt;td&gt;Jump to that line number&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;%&lt;/td&gt; &lt;td&gt;If on top of a ( or {, jump to the matching one.&amp;nbsp; Very useful in coding.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;m&amp;lt;letter&amp;gt;&lt;/td&gt; &lt;td&gt;Sets a bookmark labeled &amp;lt;letter&amp;gt; at the cursor.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;'&amp;lt;letter&amp;gt;&lt;/td&gt; &lt;td&gt;Returns to &amp;lt;letter&amp;gt; bookmark.&amp;nbsp; Useful for jumping around a file.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;u&lt;/td&gt; &lt;td&gt;Undo the last change.&amp;nbsp; Useful if you forgot you weren't in insert mode.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;gg&lt;/td&gt; &lt;td&gt;Go to the top of the file.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;G&lt;/td&gt; &lt;td&gt;Go to the bottom of the file.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;gt;&amp;gt;&lt;/td&gt; &lt;td&gt;Increase indent.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&amp;lt;&amp;lt;&lt;/td&gt; &lt;td&gt;Decrease indent.&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;o&lt;/td&gt; &lt;td&gt;Insert a new line below and enter insert mode.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;These commands, in addition to the search and replace command introduced in the notepad post are the ones I find myself using most frequently.&amp