<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Programmer's Edge</title>
    <description>Free articles, news, forums, reviews, scripts and FAQs covering a wide range of topics related to the Microsoft community including .NET, Windows Azure, Silverlight, WPF, and SQL Server.</description>
    <link>http://www.programmersedge.com/</link>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>BlogEngine.NET 2.7.0.0</generator>
    <language>en-GB</language>
    <blogChannel:blogRoll>http://www.programmersedge.com/opml.axd</blogChannel:blogRoll>
    <blogChannel:blink>http://www.dotnetblogengine.net/syndication.axd</blogChannel:blink>
    <dc:creator>Programmer's Edge</dc:creator>
    <dc:title>Programmer's Edge</dc:title>
    <geo:lat>0.000000</geo:lat>
    <geo:long>0.000000</geo:long>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ProgrammersEdge" /><feedburner:info uri="programmersedge" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-nd/2.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>ProgrammersEdge</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
      <title>Warning! Latest Windows 8 updates and SSD Acceleration!</title>
      <description>&lt;p&gt;So last night upon returning home, I found one of my super machines wanting to be restarted so that it could start to apply a batch of Windows 8 updates to it. This particular machine is one of the Z series motherboards which uses an SSD card as a cache drive for the primary drive (in this case a 1 TB ) so that your most used stuff gets cached but you still get the benefit of&amp;#160; having a very large drive. It is an incredibly fast combo that gives you the best of both worlds….faster boot up and apps just scream in loading up if they are in the cache. &lt;/p&gt;  &lt;p&gt;So upon restarting, I got introduced to what appears to be the new Windows 8 sad face blue screen. No biggie, it says it is gathering some information and sending it off or something like that before rebooting. After rebooting, it would go to the recovery screen ..I pick automatic recovery mode so that it should try to self-heal itself. It reboots…self-healing mode…BAM! Sad face screen again… (Sigh). I guess it is time to go back to yesterday’s image but 1 TB will take a while. So reboot…..recovery screen…. recover from image… error cannot find …. recover from specific image…..error cannot find…. (sigh)…so possibly a disk problem? &lt;/p&gt;  &lt;p&gt;So I do the following … &lt;/p&gt;  &lt;p&gt;1. Check BIOS &lt;/p&gt;  &lt;p&gt;2. Run various CHKDSK &lt;/p&gt;  &lt;p&gt;3. Run specialized disk scanner &lt;/p&gt;  &lt;p&gt;4. Sync SSD card with hard drive&lt;/p&gt;  &lt;p&gt;5. Clear SSD cache &lt;/p&gt;  &lt;p&gt;Nope….Nadda… no love from the OS… perpetual&amp;#160; sad face / reboot / recovery. It starts to look like I will have to do wipe/ rebuild and then apply an image ( my images are all on a separate drive of course ). The thought of loading Windows 8 last night was less than exciting so I decided to do one more thing. I removed acceleration from the primary drive, leaving the SSD in the same semi- RAID 0 configuration but basically making it inert. &lt;/p&gt;  &lt;p&gt;BINGO! Windows starting! Woot!&amp;#160; So I login…everything looks good…. reboot….put acceleration back on….Sad face screen again… Hmmmmm… so I removed acceleration again until I can figure out exactly why Windows 8 dislikes my SSD cache drive so much. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;So if you are running into the Blue Sad Face Screen on Windows 8 after a set of updates and you are running the same configuration. You may want to try removing the acceleration from the primary drive. It won’t be as fast but its better than having your box brick on you. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Cheers!   &lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=g1Mo8UBZuPE:phmys9kqcrU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=g1Mo8UBZuPE:phmys9kqcrU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=g1Mo8UBZuPE:phmys9kqcrU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=g1Mo8UBZuPE:phmys9kqcrU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=g1Mo8UBZuPE:phmys9kqcrU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=g1Mo8UBZuPE:phmys9kqcrU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/g1Mo8UBZuPE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/g1Mo8UBZuPE/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/03/14/Warning!-Latest-Windows-8-updates-and-SSD-Acceleration!.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=c4cad27c-4434-4e5b-8cef-69b3806204bd</guid>
      <pubDate>Thu, 14 Mar 2013 08:08:47 -0400</pubDate>
      <category>Windows</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=c4cad27c-4434-4e5b-8cef-69b3806204bd</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=c4cad27c-4434-4e5b-8cef-69b3806204bd</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/03/14/Warning!-Latest-Windows-8-updates-and-SSD-Acceleration!.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=c4cad27c-4434-4e5b-8cef-69b3806204bd</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=c4cad27c-4434-4e5b-8cef-69b3806204bd</feedburner:origLink></item>
    <item>
      <title>SSIS Execute SQL Task : Mapping Parameters And Result Sets</title>
      <description>&lt;p&gt;A very common scenario in an ETL process is one in which you need to call out to some configuration tables to figure out some values that it needs to use somewhere downstream in the process. Quite often you also want to pass in some parameters as well. So in this article I will be addressing both of those scenarios. To start, you will just need to drop an Execute SQL Task item onto the Control Flow of an SSIS package and set up the initial configuration so that it is basically given a connection string&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="image" src="http://www.programmersedge.com/pics/SQLTaskEditor1.png" alt="image" width="442" height="376" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Now we want to enter in our SQL statement that will contain the parameters. In this case we are using a SQL Server connection and I will be calling a stored procedure. So I will provide ?s for each of the parameters involved. So my statement look like this&amp;hellip;&lt;/p&gt;
&lt;p&gt;exec Staging.usp_GetTicketQueries ?,?,?&lt;/p&gt;
&lt;p&gt;I could also be more verbose if I wanted to&lt;/p&gt;
&lt;p&gt;exec Staging.usp_GetTicketQueries&amp;nbsp; @StartDate=?,@EndDate=?,@SomeOtherValue=?&lt;/p&gt;
&lt;p&gt;but it isn&amp;rsquo;t entirely necessary. Now that I have the statement ready I just need to click on the Parameter Mapping menu item on the left hand side and map my parameters.&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="image" src="http://www.programmersedge.com/pics/SQLTaskEditor2.png" alt="image" width="457" height="288" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Notice that there isn&amp;rsquo;t anything really tricky here. I line out the variables that will be used with the appropriate type and size. The only part that trips a lot of people up is the fourth one which is the Parameter Name. When you initially add an additional parameter to map this column will have a text name in it. Instead what I have done is to change these so that instead it has the 0 based index of the parameters in my statement. Once you have them mapped to the proper index value then everything should be golden.&lt;/p&gt;
&lt;p&gt;Now we want to grab that result set that is being sent from the stored proc and map its values to some different variables. So we need to go back to the General settings screen and in the &amp;ldquo;Result Set&amp;rdquo; section change the value of the ResultSet property to something other than None in order to be able to make changes to the ResultSet screen later. In this case, I am just returning a single row. So I merely change the value to Single row and I am ready to map the result set.&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="image" src="http://www.programmersedge.com/pics/SQLTaskEditor3.png" alt="image" width="466" height="295" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Now switch to the Result Set screen via the menu on the left. Here what you will want to do is to map the actual column names of the result set to the variables that you want them to be placed into. Pretty simple. In the end, you will have something that looks like this.&lt;/p&gt;
&lt;p&gt;&lt;img style="background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;" title="image" src="http://www.programmersedge.com/pics/SQLTaskEditor4.png" alt="image" width="471" height="298" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Now you can click OK as you are finished with the process. This is actually a fairly handy thing to know in order to make your ETL processes a little more dynamic.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=RfcLuvh2Nos:uhMyMS13Z-g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=RfcLuvh2Nos:uhMyMS13Z-g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=RfcLuvh2Nos:uhMyMS13Z-g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=RfcLuvh2Nos:uhMyMS13Z-g:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=RfcLuvh2Nos:uhMyMS13Z-g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=RfcLuvh2Nos:uhMyMS13Z-g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/RfcLuvh2Nos" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/RfcLuvh2Nos/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=cd099305-0234-4376-80d5-518e8932474a</guid>
      <pubDate>Tue, 05 Mar 2013 08:59:00 -0400</pubDate>
      <category>SQL Server</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=cd099305-0234-4376-80d5-518e8932474a</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=cd099305-0234-4376-80d5-518e8932474a</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/03/05/ssis-execute-sql-task-mapping-parameters-and-result-sets.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=cd099305-0234-4376-80d5-518e8932474a</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=cd099305-0234-4376-80d5-518e8932474a</feedburner:origLink></item>
    <item>
      <title>Capitalism Works! Even for Hackers?</title>
      <description>&lt;p&gt;InfoWorld is finally reporting on a rather disheartening trend that I have watched over the past year or so, which is the rise of the consumer black markets for malware. That&amp;rsquo;s right, just when you thought that those wily hackers couldn&amp;rsquo;t get any worse, they have finally figured out that it isn&amp;rsquo;t really nearly as profitable doing all that work yourself. Instead what you should do is go out and package up your knowledge and sell it out on the marketplace.&lt;/p&gt;
&lt;p&gt;It used to be&amp;nbsp; that you would put all of your work into creating series of botnets out there. Basically a mass of compromised PCs that is waiting at your beckon call to do something. Of course, it was up to you to figure out what that something was&amp;hellip;so you would sit around and wait for the right opportunities to present themselves&amp;hellip;but not anymore. Now you can go out on the market and sell your botnets for around $1000.00 for a 10,000 computer unit.&lt;/p&gt;
&lt;p&gt;That sounds like a lot right? Not really&amp;hellip; 10K is small. Facebook helped the FBI take down a botnet of over 11 million computers just last December&amp;hellip; that&amp;rsquo;s right 11 MILLION &amp;hellip;. &lt;a title="CNET - Facebook helps FBI take down $850M botnet crime ring" href="http://news.cnet.com/8301-1009_3-57558654-83/facebook-helps-fbi-take-down-$850m-botnet-crime-ring/"&gt;CNET - Facebook helps FBI take down $850M botnet crime ring&lt;/a&gt; .&amp;nbsp; That&amp;rsquo;s' right .. the botnet was worth about $850 MILLION!&lt;/p&gt;
&lt;p&gt;So if you would like to see all the gory details, you need to check out InfoWorld&amp;rsquo;s article then go update all of your Anti-virus and Malware detection software.&lt;/p&gt;
&lt;p&gt;&lt;a title="Prices fall, services rise in malware-as-a-service market" href="http://www.infoworld.com/d/security/prices-fall-services-rise-in-malware-service-market-213776"&gt;Prices fall, services rise in malware-as-a-service market&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=Sg08KLj7jFI:bQuW967mjH4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=Sg08KLj7jFI:bQuW967mjH4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=Sg08KLj7jFI:bQuW967mjH4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=Sg08KLj7jFI:bQuW967mjH4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=Sg08KLj7jFI:bQuW967mjH4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=Sg08KLj7jFI:bQuW967mjH4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/Sg08KLj7jFI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/Sg08KLj7jFI/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/03/04/Capitalism-Works!-Even-for-Hackers.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=a81a5732-b014-47e5-84e2-fcfdc202f847</guid>
      <pubDate>Mon, 04 Mar 2013 08:16:00 -0400</pubDate>
      <category>Miscellaneous</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=a81a5732-b014-47e5-84e2-fcfdc202f847</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=a81a5732-b014-47e5-84e2-fcfdc202f847</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/03/04/Capitalism-Works!-Even-for-Hackers.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=a81a5732-b014-47e5-84e2-fcfdc202f847</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=a81a5732-b014-47e5-84e2-fcfdc202f847</feedburner:origLink></item>
    <item>
      <title>Use Your Azure Settings!</title>
      <description>&lt;p&gt;A lot of times you are used to creating your connection strings and important app settings in your web.config file. However, what happens when you are creating a worker process that you don&amp;rsquo;t necessarily have a config file for? What if you wanted to update a value without have to repost the code to your application?&lt;/p&gt;
&lt;p&gt;Luckily, Microsoft provides us with the ability to specify settings values for each of the cloud pieces of our application. So if we open up a simple cloud application with a worker process then we can begin to see how this works.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/AzureConnectionStrings_1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The cloud project will be the one we are working with. We simply right click on the role that we want to attach settings to and select Properties. In our example, this would be WorkerRole1. Opening up the Properties window you will see the following:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/AzureConnectionStrings_2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here you can specify how many instance and what size you want them to be for this particular role. You would click the Settings tab from the menu on the left hand side to access the Settings area.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/AzureConnectionStrings_4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, we have the ability to add settings here either as String or Connection String types. You may think that the Connection String would be the type used for inputting connection strings for things like database connections. However, if you open the editor you will see that this is only used for Azure Storage connections.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/AzureConnectionStrings_3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;So instead we would put in our connection strings as normal String types. Then all we have left is to be able to use it in code. For this you simply have to use the RoleEnvironment.GetConfigurationSettingValue and pass along the key to the setting value.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; height: 78px; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;var sqlConnectionString = &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;    RoleEnvironment.GetConfigurationSettingValue(&lt;span style="color: #006080;"&gt;"SQLServerConnection"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We might even only want to access the Settings values if we are in a cloud environment(local or Azure based). Microsoft provides an IsAvailable property on RoleEnvironment exactly for that. So the code below would check to see if we are in a cloud environment and if not then revert back and use a connection string using ConfigurationManager.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; height: 93px; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;var sqlConnectionString = &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;                (RoleEnvironment.IsAvailable) ? RoleEnvironment.GetConfigurationSettingValue(&lt;span style="color: #006080;"&gt;"SQLServerConnection"&lt;/span&gt;) : &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;                ConfigurationManager.ConnectionStrings[&lt;span style="color: #006080;"&gt;"DBTelemetryDatabase"&lt;/span&gt;].ConnectionString;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hopefully, this helps you get the most out of your cloud based projects!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ninja&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/AzureNinja_Profile.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Azure Ninja&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(AKA James) is a senior cloud architect that enjoys writing about everything and anything Azure related. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=3Mk5XaDaqG0:6voy3fgnDnQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=3Mk5XaDaqG0:6voy3fgnDnQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=3Mk5XaDaqG0:6voy3fgnDnQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=3Mk5XaDaqG0:6voy3fgnDnQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=3Mk5XaDaqG0:6voy3fgnDnQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=3Mk5XaDaqG0:6voy3fgnDnQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/3Mk5XaDaqG0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/3Mk5XaDaqG0/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/02/11/Use-Your-Azure-Settings!.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=b13e69e9-dc7f-491b-9a86-3ddf4933657a</guid>
      <pubDate>Mon, 11 Feb 2013 19:59:00 -0400</pubDate>
      <category>Azure</category>
      <dc:publisher>Cloud Ninja</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=b13e69e9-dc7f-491b-9a86-3ddf4933657a</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=b13e69e9-dc7f-491b-9a86-3ddf4933657a</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/02/11/Use-Your-Azure-Settings!.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=b13e69e9-dc7f-491b-9a86-3ddf4933657a</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=b13e69e9-dc7f-491b-9a86-3ddf4933657a</feedburner:origLink></item>
    <item>
      <title>Microsoft Announces New Pricing for Azure SQL Reporting Services</title>
      <description>&lt;p&gt;Microsoft announced earlier this month that they were changing the way Azure SQL Reporting was being charged.&lt;/p&gt;
&lt;p&gt;&lt;a title="http://blogs.msdn.com/b/windowsazure/archive/2013/02/01/sql-reporting-services-pricing-update.aspx" href="http://blogs.msdn.com/b/windowsazure/archive/2013/02/01/sql-reporting-services-pricing-update.aspx"&gt;http://blogs.msdn.com/b/windowsazure/archive/2013/02/01/sql-reporting-services-pricing-update.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I believe this is due in large part to a lot of pressure from the general public that they were&amp;nbsp; just not going to use it at the current pricing levels. Simply put it just did not make sense. With the original pricing, you were essentially paying $0.88/hr for 200 reports. Sounds fairly inexpensive until you start running the math..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;24 hours/day * 30 days/month * $0.88/hr =&amp;nbsp; ~ $630.00/ month&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ouch! Especially if all you need is a smaller scale instance in order to server up reports for a web site. Additionally, remember that this is for 200 reports/hour. If you go over those 200 reports then you are charged another $0.88 . Double ouch! This shocked quite a few people when the original pricing was announced because those of use in the beta hadn&amp;rsquo;t really heard anything about pricing yet and had assumed that maybe it would be baked into the SQL Azure pricing or that possibly would entail you spinning up an app server.&lt;/p&gt;
&lt;p&gt;Now about 6 months later, it seems that Microsoft has figured out that it just wasn&amp;rsquo;t working and has revamped their pricing model. So there are a couple of points that you need to follow.&lt;/p&gt;
&lt;p&gt;1. Base price is $0.16/hr&lt;/p&gt;
&lt;p&gt;2. Report base is 30 reports/hr&lt;/p&gt;
&lt;p&gt;With the new pricing schema you now have a lot more flexibility depending on how many reports you would actually need to consistently run. So baseline for the new model will be&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: large;"&gt;24 hours/day * 30 days/month * $0.16/hr&amp;nbsp; =&amp;nbsp; ~ $115.00/month&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a LOT better than the previous one. You are getting a greater than 80% decrease, which should allow a lot more people to join in. Of course, I have yet to dive in an see what the pricing implication are for running a report with multiple subreports&amp;hellip;.are those counted as one report or a several reports? Once I find that out then I will provide some edits to this post outlining all the wrinkles involved.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;All in all, Good Move Microsoft!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ninja&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/AzureNinja_Profile.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Azure Ninja&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(AKA James) is a senior cloud architect that enjoys writing about everything and anything Azure related. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=B1OR4HoT-70:aAc-cpsierU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=B1OR4HoT-70:aAc-cpsierU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=B1OR4HoT-70:aAc-cpsierU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=B1OR4HoT-70:aAc-cpsierU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=B1OR4HoT-70:aAc-cpsierU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=B1OR4HoT-70:aAc-cpsierU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/B1OR4HoT-70" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/B1OR4HoT-70/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/02/08/Microsoft-Announces-New-Pricing-for-Azure-SQL-Reporting-Services.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=38ae2d5f-5f36-4ea5-a06f-a1debd9db9d2</guid>
      <pubDate>Fri, 08 Feb 2013 08:07:00 -0400</pubDate>
      <category>Azure</category>
      <dc:publisher>Cloud Ninja</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=38ae2d5f-5f36-4ea5-a06f-a1debd9db9d2</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=38ae2d5f-5f36-4ea5-a06f-a1debd9db9d2</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/02/08/Microsoft-Announces-New-Pricing-for-Azure-SQL-Reporting-Services.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=38ae2d5f-5f36-4ea5-a06f-a1debd9db9d2</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=38ae2d5f-5f36-4ea5-a06f-a1debd9db9d2</feedburner:origLink></item>
    <item>
      <title>Fear Not the Mighty TRIM() Function!</title>
      <description>&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/shockedbaby.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jason Strate wrote up an excellent blog post dealing with the people asking for SQL Server to have a TRIM() function in addition to the LTRIM() and RTRIM() function and the possibility of performance issues creeping up.&amp;nbsp; You can check out his post below:&lt;/p&gt;
&lt;p&gt;&lt;a title="Jason Strate on TRIM() function in SQL Server" href="http://www.jasonstrate.com/2010/02/please-no-trim/" target="_blank"&gt;PLEASE, NO TRIM()?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jason points out using two examples&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;RTRIM()&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff;"&gt;FROM&lt;/span&gt; Person.Contact &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;WHERE&lt;/span&gt; RTRIM(EmailAddress) = &lt;span style="color: #006080;"&gt;'gustavo0@adventure-works.com'&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/TRIM_Query1.png" alt="" width="458" height="223" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;LTRIM() + RTIM() = TRIM() Equivalent&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff;"&gt;FROM&lt;/span&gt; Person.Contact &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;WHERE&lt;/span&gt; LTRIM(RTRIM(EmailAddress)) = &lt;span style="color: #006080;"&gt;&lt;a href="mailto:'gustavo0@adventure-works.com'"&gt;'gustavo0@adventure-works.com'&lt;/a&gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/TRIM_Query2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now on the face of things, this looks kind of bad&amp;hellip;.you&amp;rsquo;ve traded off a really good index scan and key lookup for a clustered index scan. Also if you look at the I/O counts as Jason does it bears out that this is the wrong thing to do &amp;hellip;basically 178 reads for the RTRIM() version versus 570 reads for the TRIM() version&amp;hellip;&lt;/p&gt;
&lt;p&gt;However, the problem here is the LTRIM function and how it is handled by the system. Basically, every query that you send to the database goes through a multi-step process in order to get your results&amp;hellip;&lt;/p&gt;
&lt;p&gt;1. Parser: Yep, the system actually checks to ensure that you know WTH you are doing before it wastes its time on some poorly typed invalid T-SQL code.&lt;/p&gt;
&lt;p&gt;2. Algebrizer: This piece is harder for people to understand. If your query is a DML then we have some extra work to do. Basically, it&amp;rsquo;s the same as a mechanic trying to work on an engine&amp;hellip;. before he can actually get a plan together to do some work he needs to know what he is working with in order to pick the right tools. That&amp;rsquo;s what the Algebrizer&amp;rsquo;s job is. Resolve all of the various table and columns , do some aggregate binding(if there are any), and type check everything. It wraps it all up nice and neat into what is typically referred to as the Algebrizer Tree or the Query Processor Tree.&lt;/p&gt;
&lt;p&gt;3. Optimizer: The optimizer is the thinker of the bunch, and it&amp;rsquo;s job is a lot like an insurance adjuster. Take a look at what we have to work on, take a look at the tools we have to use(like indexes), look at the costs involved(I/O, CPU, etc. )&amp;nbsp; and figure out a plan of attack in order to execute. Now, it&amp;rsquo;s job is NOT to come up with the best plan but to come up with the &amp;ldquo;meh-this look good enough for military work&amp;rdquo;, within the quickest timeframe possible, and the best use of resources.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You also have to understand that with all the glory and coolness that surrounds the optimizer, it is only a piece of dumb code&amp;hellip;Yep, that&amp;rsquo;s right dumb code because code is only as smart as you program it to be. So obviously the optimizer is coded to treat the RTRIM function differently from the LTRIM function.&amp;nbsp; You can see this by simply removing the RTRIM function from out second example and looking at the resulting plan.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff;"&gt;FROM&lt;/span&gt; Person.Contact &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;WHERE&lt;/span&gt; LTRIM(EmailAddress) = &lt;span style="color: #006080;"&gt;&lt;a href="mailto:'gustavo0@adventure-works.com'"&gt;'gustavo0@adventure-works.com'&lt;/a&gt;&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/TRIM_Query3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s the same plan! What&amp;rsquo;s more, if you look at the actual reads &amp;hellip;. it&amp;rsquo;s actually saying that it will be the same amount of reads involved. Also we could &amp;ldquo;influence&amp;rdquo; the plan by giving the query a hint. Below we simply give it a hint that we would like for it to strongly consider using the index that is used by the RTRIM function query.&amp;nbsp; Look at what the result is.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff;"&gt;FROM&lt;/span&gt; Person.Contact &lt;span style="color: #0000ff;"&gt;WITH&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;INDEX&lt;/span&gt;(IX_Contact_EmailAddress)) &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;WHERE&lt;/span&gt; LTRIM(RTRIM(EmailAddress)) = &lt;span style="color: #006080;"&gt;'gustavo0@adventure-works.com'&lt;/span&gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img src="http://www.programmersedge.com/pics/TRIM_Query4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Basically, we have a nearly identical plan to original RTRIM statement that we used. Sure the percentages are skewed slightly but if we delve a little deeper to look at the counts we would find the following&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;RTRIM()&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; height: 64px; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;Table&lt;/span&gt; &lt;span style="color: #006080;"&gt;'Contact'&lt;/span&gt;. Scan &lt;span style="color: #0000ff;"&gt;count&lt;/span&gt; 1, logical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 178, physical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, &lt;span style="color: #0000ff;"&gt;read&lt;/span&gt;-ahead &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob logical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob physical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob &lt;span style="color: #0000ff;"&gt;read&lt;/span&gt;-ahead &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0.&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;HINTED LTRIM() + RTRIM()&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; height: 64px; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;Table&lt;/span&gt; &lt;span style="color: #006080;"&gt;'Contact'&lt;/span&gt;. Scan &lt;span style="color: #0000ff;"&gt;count&lt;/span&gt; 1, logical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 179, physical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, &lt;span style="color: #0000ff;"&gt;read&lt;/span&gt;-ahead &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob logical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob physical &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0, lob &lt;span style="color: #0000ff;"&gt;read&lt;/span&gt;-ahead &lt;span style="color: #0000ff;"&gt;reads&lt;/span&gt; 0.&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A difference of 1 in reads between to the two plans according to SQL Server. So the basic premise is that you should actually want SQL Server to add a TRIM function because when they do they will also program how the optimizer &amp;ldquo;looks&amp;rdquo; at this function in the whole scheme of things and will probably make it much closer to the RTRIM function than the LTRIM one. Plus, you could look at this as a bonus because if your developers do actually need to use something like TRIM then they would have the optimized function instead of relying on the crappy work around.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;What do you think? Do you want SQL Server to add a TRIM function? Maybe you should vote it up or down on Microsoft&amp;rsquo;s Connect site&lt;/p&gt;
&lt;p&gt;&lt;a title="Vote for SQL Server to have a TRIM function" href="http://connect.microsoft.com/SQLServer/feedback/details/185694/add-a-trim-function" target="_blank"&gt;Add a Trim Function&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers! &lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=wfLScW1OM0I:j-0zr5fIq94:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=wfLScW1OM0I:j-0zr5fIq94:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=wfLScW1OM0I:j-0zr5fIq94:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=wfLScW1OM0I:j-0zr5fIq94:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=wfLScW1OM0I:j-0zr5fIq94:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=wfLScW1OM0I:j-0zr5fIq94:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/wfLScW1OM0I" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/wfLScW1OM0I/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/02/07/Fear-Not-the-Mighty-TRIM()-Function!.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=2438e7bc-d763-4a17-8c47-a737ab1a58d4</guid>
      <pubDate>Thu, 07 Feb 2013 12:24:00 -0400</pubDate>
      <category>SQL Server</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=2438e7bc-d763-4a17-8c47-a737ab1a58d4</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=2438e7bc-d763-4a17-8c47-a737ab1a58d4</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/02/07/Fear-Not-the-Mighty-TRIM()-Function!.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=2438e7bc-d763-4a17-8c47-a737ab1a58d4</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=2438e7bc-d763-4a17-8c47-a737ab1a58d4</feedburner:origLink></item>
    <item>
      <title>Twitter Is Nuts : Considering Two-Factor Authentication</title>
      <description>&lt;p&gt;&lt;img src="http://www.programmersedge.com/Pics/hacked.jpg" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Okay so it looks from &lt;a title="Twitter Considering Two Factor Authentication" href="http://www.neowin.net/news/twitter-might-start-using-two-factor-authentication" target="_blank"&gt;this post&lt;/a&gt; that Twitter is at least considering two-factor authentication since it had a &lt;a title="Twitter Security Breach" href="http://www.neowin.net/news/twitter-hacked-up-to-250000-accounts-compromised" target="_blank"&gt;security breach&lt;/a&gt; in which 250,000 user accounts were compromised. During the breach Bob Lord revealed that passwords and salts were taken but they didn&amp;rsquo;t think that they could be cracked but just as a &amp;ldquo;precaution&amp;rdquo; they were resetting them.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;The attackers were extremely sophisticated, and we believe other companies and organizations have also been recently similarly attacked. &lt;br /&gt;For that reason we felt that it was important to publicise this attack while we still gather information, and we are helping government and federal law enforcement in their effort to find and prosecute these attackers to make the Internet safer for all users.&amp;rdquo;&amp;nbsp; &amp;ndash; Bob Lord (Director of Information Security @ Twitter )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Of course, those of you attending my security sessions last year remember that I was working on cracking algorithms using GPUs&amp;hellip;. then later on this happened (&lt;a title="Windows Passwords Cracked in 6 Hours With GPU Cluster" href="http://arstechnica.com/security/2012/12/25-gpu-cluster-cracks-every-standard-windows-password-in-6-hours/" target="_blank"&gt;Windows Passwords Cracked in 6 Hours with GPU Cluster&lt;/a&gt;) .&amp;nbsp; So the improbability of them cracking encrypted passwords doesn&amp;rsquo;t seem so improbable at all. One thing true hackers normally have is patience.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="background-color: #ffff99; border: black 1px solid; padding: 10px;"&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;What is Two-Factor Authentication&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Two-factor authentication adds on to the traditional reliance of username/password authentication with a second phase of entering a one time only password. This is typically referred to as the &amp;ldquo;something you know, something you have&amp;rdquo; scenario. The username/password being the &amp;ldquo;something you know&amp;rdquo; and typically a device(cell phone) being sent the one-time only password being the &amp;ldquo;something you have&amp;rdquo;. So it makes it highly unlikely that a hacker would get both your username/password and also your cell phone&amp;hellip;.unless they REALLY want to mug you to get it.&lt;/p&gt;
&lt;p&gt;Additionally, they take care of (normally) the issue of using applications to access your account(like Outlook) by generating what is known as an application specific password. This is a password you would have the system generate(usually long and complex) that you would use for that application instead of your normal password. Then you can revoke/update the password application to application.&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So now Twitter is considering two-factor authentication&amp;hellip;.sigh&amp;hellip;and I am here just trying to yell &amp;ldquo;STOP THE MADNESS!&amp;rdquo;. Yes, that is right&amp;hellip;.just stop it! Two-factor authentication is great&amp;hellip;just great when used in the right situation. So I thought it would be helpful to outline some of my thoughts on the subject&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All of this is pretty snazzy and protect against a lot of things but should it be used for everything like Twitter?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, it&amp;rsquo;s Twitter for God&amp;rsquo;s sake! &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, you shouldn&amp;rsquo;t be using the same password for twitter that you use for your other accounts&amp;hellip;period! &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, it&amp;rsquo;s Twitter for God&amp;rsquo;s sake! &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, hackers don&amp;rsquo;t necessarily care about cracking your Twitter password (see below) &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, it&amp;rsquo;s Twitter for God&amp;rsquo;s sake! &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size: medium;"&gt;No, two-factor authentication doesn&amp;rsquo;t protect your from every scenario (see below) &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, now let&amp;rsquo;s look at some of the scenarios that even if Twitter had two-factor authentication doesn&amp;rsquo;t help a whole lot.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. &lt;strong&gt;Hackers really want your email&lt;/strong&gt;:&amp;nbsp; Yes, that&amp;rsquo;s right. A lot of the time hackers just want your email so that they can perform a &lt;a href="http://en.wikipedia.org/wiki/Phishing" target="_blank"&gt;phishing&lt;/a&gt; attack. Basically, it is the lazy hacker saying&amp;hellip;oh I could go and try and try to crack these passwords or I could use something like Backtrack to generate a fake website and send you a &amp;ldquo;ZOMG! Your Twitter account was hacked and we need you to authenticate!&amp;rdquo;. This actually takes about 5 whole minutes with a tool like BackTrack and even goes out to Twitter to grab the HTML code to make a realistic login page. What they are aiming at is that you will then type in your username/password &amp;hellip;. which is sent off to them and then they can use on whatever other sites they may have figured out that you have that may or may not use two-factor authentication.&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Two-factor authentication doesn&amp;rsquo;t always work:&lt;/strong&gt;&amp;nbsp; Yes, that&amp;rsquo;s right&amp;hellip;. two-factor authentication does raise the bar for hackers to gain access but in certain instances you actually can help them out and they can skirt around it.. Please see here &amp;ndash;&amp;gt;&amp;nbsp;&amp;nbsp; &lt;a title="Real Time Hackers Foil Two-Facotr Security" href="http://www.technologyreview.com/news/415371/real-time-hackers-foil-two-factor-security/" target="_blank"&gt;Real-Time Hackers Foil Two-Factor Security&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Hackers in this attack broke into the database:&lt;/strong&gt; Yeah, normally in an hack you go through phases. Plan &amp;ndash; Scan &amp;ndash; Attack &amp;ndash; Elevate &amp;ndash; Persist. Pretty simple. So if I was to break into Twitter&amp;rsquo;s database somehow and gain access, remember even Lord thinks these attackers were sophisticated to some extent, I don&amp;rsquo;t just try to do SELECTs everywhere and try to leave. Oh no, I try to elevate my permissions to get as much of the good stuff as possible and if I can gain write permissions then it is off to the races. So Twitter saying &amp;ldquo;We&amp;rsquo;re going to implement two-factor authentication to protect our user&amp;rsquo;s data&amp;rdquo; doesn&amp;rsquo;t really so much protect the data if the attackers gain access to the source. If the phone number used by TFA is not stored correctly in the DB, then what is stopping them from doing a little UPDATE to send them to the burn phone is Moscow?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are plenty of other examples I could use like your application specific passwords &amp;hellip;or when you check the little box to tell Google or whomever to trust your computer for 30 days so you don&amp;rsquo;t have to be annoyed with the TFA &amp;ndash; SMS scenario every time you try to access something.&amp;nbsp; What&amp;rsquo;s even worse is the case of man-in-the-middle attacks where they could make you go through the whole process of getting the one-time token&amp;hellip;and the whole time they are intercepting your traffic and passing it on. So you are literally helping them to break into your own account&amp;hellip;.and I could go on and on.&lt;/p&gt;
&lt;p&gt;The main point of all of this is not that two-factor authentication is not normally secure. &lt;strong&gt;It is!&lt;/strong&gt; However, I think that everyone needs to take a deep breath before we start running around and screaming &amp;ldquo;The internet is broken! Two-factor authentication EVERYWHERE!&amp;rdquo;. Let&amp;rsquo;s keep it for the stuff that we really need it for like the email accounts that we use for our uber important stuff and not our non-important stuff like Twitter.&lt;/p&gt;
&lt;p&gt;What do you think?&amp;nbsp; Do you want two-factor authentication for Twitter?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Cheers! &lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=myV6bdJ03YI:HSJyr_d1FzY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=myV6bdJ03YI:HSJyr_d1FzY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=myV6bdJ03YI:HSJyr_d1FzY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=myV6bdJ03YI:HSJyr_d1FzY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=myV6bdJ03YI:HSJyr_d1FzY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=myV6bdJ03YI:HSJyr_d1FzY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/myV6bdJ03YI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/myV6bdJ03YI/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/02/05/Twitter-Is-Nuts-Considering-Two-Factor-Authentication.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=8a6934da-2263-4c28-82f0-ff05a92c80c0</guid>
      <pubDate>Tue, 05 Feb 2013 11:42:00 -0400</pubDate>
      <category>Miscellaneous</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=8a6934da-2263-4c28-82f0-ff05a92c80c0</pingback:target>
      <slash:comments>1</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=8a6934da-2263-4c28-82f0-ff05a92c80c0</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/02/05/Twitter-Is-Nuts-Considering-Two-Factor-Authentication.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=8a6934da-2263-4c28-82f0-ff05a92c80c0</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=8a6934da-2263-4c28-82f0-ff05a92c80c0</feedburner:origLink></item>
    <item>
      <title>Silverlight : Hooking up a Default Button Action</title>
      <description>&lt;p&gt;One of the typical things that you may want to accomplish on a particular UI implementation in Silverlight is to have a default button that is triggered through the use of the enter key. For this Silverlight provides support UI Automation through a set of peer classes that derive from AutomationPeer. Most controls contain an AutomationPeer object &amp;hellip;in our example the Button control has a ButtonAutomationPeer class.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So in order to make this happen we are going to set up a behavior that we can simply attach to a control and configure to point to the button that we would like for the Enter key to trigger. So we simply start out with a simple behavior class&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; DefaultButtonBehavior : TargetTriggerAction&amp;lt;ButtonBase&amp;gt; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; AutomationPeer _automationPeer {get;set;}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; ButtonBase _targetButton {get;set;}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Nothing fancy here. Wu use TargetTriggerAction to say that this is specifically targeting an object of type ButtonBase. This will enable use to target anything that also derives from ButtonBase. So in regards to controls like &lt;a href="http://www.telerik.com/" target="_blank"&gt;Telerik&lt;/a&gt; and their RadButton control, you would be able to use the same code to target their control. The AutomationPeer and ButtonBase objects are specifically there so that we can get hooks into the targeted button and more importantly it&amp;rsquo;s AutomationPeer object.&lt;/p&gt;
&lt;p&gt;Now we are ready to start implementing some basic code in order to override what happens when the behavior is attached or the target is changed.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnAttached()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;.OnAttached();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;  &lt;span style="color: #008000;"&gt;/// Set our target button equal to the target that is assigned&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   _targetButton = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Target&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;  &lt;span style="color: #008000;"&gt;/// Double check to ensure that they set the target properly&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;  &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( _targetButton == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #008000;"&gt;/// Grab an automation peer for our target button&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   _automationPeer = FrameworkElementAutomationPeer.FromElement(_targetButton);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #008000;"&gt;/// Check to ensure that it exists. If not then create one&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( _automationPeer == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;       _automationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(_targetButton);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnTargetChanged(ButtonBase oldTarget, ButtonBase newTarget)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;.OnTargetChanged(oldTarget, newTarget);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #008000;"&gt;/// Set our target button equal to the new target &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;     _targetButton = newTarget;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( _targetButton == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; ) &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;         &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #008000;"&gt;/// Grab our new automation peer&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;     _automationPeer = FrameworkElementAutomationPeer.FromElement(_targetButton);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #008000;"&gt;/// Double check that it exists and if not then create one &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( _automationPeer == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;         _automationPeer = FrameworkElementAutomationPeer.CreatePeerForElement(_targetButton);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The two method control the what happens when the behavior is first attached and then when the target is changed. Essentially they do the same thing. Grab a reference to our target button and then also to that button&amp;rsquo;s AutomationPeer and if it does not have one then we will create one for it.&lt;/p&gt;
&lt;p&gt;Now we are ready to write the code for actually doing something once the behavior is triggered. For this we override the Invoke method.&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Invoke(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; parameter)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;{&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #008000;"&gt;/// Convert the parameter object to a KeyEventArgs &lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   KeyEventArgs args = parameter &lt;span style="color: #0000ff;"&gt;as&lt;/span&gt; KeyEventArgs;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #008000;"&gt;/// Now let's double check that we actually have something and that something&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #008000;"&gt;/// is actually the Enter key&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;   &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( args != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; args.Key == Key.Enter )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;   {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;       &lt;span style="color: #008000;"&gt;/// Check that we have a reference to the automation peer and it is enabled&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;       &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;( _automationPeer != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; _automationPeer.IsEnabled() )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;       {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;          IInvokeProvider provider = _automationPeer.GetPattern(PatternInterface.Invoke) &lt;span style="color: #0000ff;"&gt;as&lt;/span&gt; IInvokeProvider;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;          provider.Invoke();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;        }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;    }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;}&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;So basically in the Invoke method we are looking to do two things. The first is basic validation&amp;hellip;Did we get some key arguments?&amp;hellip;Was the key pressed the Enter key?&amp;hellip;..Is the automation peer of our button there and is it enabled?&lt;/p&gt;
&lt;p&gt;The next part uses that AutomationPeer&amp;rsquo;s method of GetPattern. This method is used to pass a PatternInterface enumeration to and then it will pass back the proper provider. In our example, we are merely getting the button&amp;rsquo;s Invoke provider because we simply want to &amp;ldquo;click&amp;rdquo; the button. Then we can simply call it&amp;rsquo;s Invoke method to fire it off. Interestingly enough, the GetPattern method is an extremely powerful method when creating custom AutomationPeer implementations because you can pass back either a provider for the particular base object or even a subelement. So if you look at how the ItemsControl works you would see that it&amp;rsquo;s GetPattern method checks to see if the pattern interface enumeration being passed to it is asking for Scroll. If it is then it delegates that off to the ScrollViewer control that is a subelement.&lt;/p&gt;
&lt;p&gt;Possibly in another post, I will go over how to create custom AutomationPeers that override the base GetPattern to do some cool things.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hopefully, this will help some of you out there that have been trying to figure out how to implement something like this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers! &lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=CjpJ3uulgmE:mQH4_wlCdUM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=CjpJ3uulgmE:mQH4_wlCdUM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=CjpJ3uulgmE:mQH4_wlCdUM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=CjpJ3uulgmE:mQH4_wlCdUM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=CjpJ3uulgmE:mQH4_wlCdUM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=CjpJ3uulgmE:mQH4_wlCdUM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/CjpJ3uulgmE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/CjpJ3uulgmE/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/01/30/Silverlight-Hooking-up-a-Default-Button-Action.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=ab8ba46c-3d1b-40fe-a52e-5b0b81699ec4</guid>
      <pubDate>Wed, 30 Jan 2013 09:03:00 -0400</pubDate>
      <category>Code!</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=ab8ba46c-3d1b-40fe-a52e-5b0b81699ec4</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=ab8ba46c-3d1b-40fe-a52e-5b0b81699ec4</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/01/30/Silverlight-Hooking-up-a-Default-Button-Action.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=ab8ba46c-3d1b-40fe-a52e-5b0b81699ec4</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=ab8ba46c-3d1b-40fe-a52e-5b0b81699ec4</feedburner:origLink></item>
    <item>
      <title>BlogEngine.NET Settings Not Saving With Values Other Than Text</title>
      <description>&lt;p&gt;You may be using BlogEngine.NET 2.7 for your blogging solution like I am and have run into a rather sticky situation in which Settings values from non scalar entities are not saving the values of properties if they are anything other than text properties. This was a little frustrating to me since I have used BlogEngine.NET in the past but the framework and thus the code has grow what seems to be exceeding complex.&lt;/p&gt;
&lt;p&gt;So where do you look in order to correct this? Well, in the admin section of the source code there is a user control for Settings.ascx.If you look specifically at the code you will notice that the Textbox items are the only ones that check to see if the particular setting that you are updating is a scalar value or not. All of the other ones merely try to update the values. Not exactly what you want to happen. So if I want to say, have Checkboxes properly add their values then I have to update the code that starts around line 129 of the Settings.ascx.cs file like this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; font-family: 'Courier New', courier, monospace; direction: ltr; text-align: left; margin: 20px 0px 10px; line-height: 12pt; max-height: 200px; width: 97.5%; background-color: #f4f4f4; border: silver 1px solid; padding: 4px;"&gt;
&lt;div id="codeSnippet" style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt; (Control ctl &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.phAddForm.Controls)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;switch&lt;/span&gt; (ctl.GetType().Name)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;case&lt;/span&gt; &lt;span style="color: #006080;"&gt;"TextBox"&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;                 var txt = (TextBox)ctl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.IsScalar)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.UpdateScalarValue(txt.ID, txt.Text);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.AddValue(txt.ID, txt.Text);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;case&lt;/span&gt; &lt;span style="color: #006080;"&gt;"CheckBox"&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;                 var cbx = (CheckBox)ctl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.IsScalar)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.UpdateScalarValue(cbx.ID, cbx.Checked.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.AddValue(cbx.ID, cbx.Checked.ToString());&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;case&lt;/span&gt; &lt;span style="color: #006080;"&gt;"DropDownList"&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt;  36:&lt;/span&gt;                 var dd = (DropDownList)ctl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt;  37:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.UpdateSelectedValue(dd.ID, dd.SelectedValue);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt;  38:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt;  39:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt;  40:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt;  41:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;case&lt;/span&gt; &lt;span style="color: #006080;"&gt;"ListBox"&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt;  42:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt;  43:&lt;/span&gt;                 var lb = (ListBox)ctl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt;  44:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.UpdateSelectedValue(lb.ID, lb.SelectedValue);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt;  45:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum46" style="color: #606060;"&gt;  46:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum47" style="color: #606060;"&gt;  47:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum48" style="color: #606060;"&gt;  48:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;case&lt;/span&gt; &lt;span style="color: #006080;"&gt;"RadioButtonList"&lt;/span&gt;:&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum49" style="color: #606060;"&gt;  49:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum50" style="color: #606060;"&gt;  50:&lt;/span&gt;                 var rbl = (RadioButtonList)ctl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum51" style="color: #606060;"&gt;  51:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Settings.UpdateSelectedValue(rbl.ID, rbl.SelectedValue);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum52" style="color: #606060;"&gt;  52:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum53" style="color: #606060;"&gt;  53:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum54" style="color: #606060;"&gt;  54:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: white; border-style: none; padding: 0px;"&gt;&lt;span id="lnum55" style="color: #606060;"&gt;  55:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; color: black; direction: ltr; text-align: left; margin: 0em; line-height: 12pt; width: 100%; background-color: #f4f4f4; border-style: none; padding: 0px;"&gt;&lt;span id="lnum56" style="color: #606060;"&gt;  56:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So now with this small change my settings page will update the values appropriately.&lt;/p&gt;
&lt;p&gt;Hopefully, this will help someone out that is trying to implement or create their own extensions for the platform.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers! &lt;br /&gt;AJ&lt;/p&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=289zQIuLo9M:B7IUT1-s8tI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=289zQIuLo9M:B7IUT1-s8tI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=289zQIuLo9M:B7IUT1-s8tI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=289zQIuLo9M:B7IUT1-s8tI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=289zQIuLo9M:B7IUT1-s8tI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=289zQIuLo9M:B7IUT1-s8tI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/289zQIuLo9M" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/289zQIuLo9M/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/01/28/BlogEngineNET-Settings-Not-Saving-With-Values-Other-Than-Text.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=83712917-516b-485f-940c-e1726f3216fb</guid>
      <pubDate>Mon, 28 Jan 2013 23:04:00 -0400</pubDate>
      <category>Code!</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=83712917-516b-485f-940c-e1726f3216fb</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=83712917-516b-485f-940c-e1726f3216fb</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/01/28/BlogEngineNET-Settings-Not-Saving-With-Values-Other-Than-Text.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=83712917-516b-485f-940c-e1726f3216fb</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=83712917-516b-485f-940c-e1726f3216fb</feedburner:origLink></item>
    <item>
      <title>Review: Samsung 840 Series 250GB Sata III Solid State Drive</title>
      <description>&lt;div style="float: left;"&gt;
&lt;p&gt;&lt;iframe style="height: 240px; width: 185px;" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=000000&amp;amp;IS2=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=progsedge-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=tf_til&amp;amp;asins=B003SX0ORA" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" align="left"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;In order to be a little more productive at work, I decided that it was high time that I switched out my older 500GB mechanical hard drive with an SSD. My old setup was utilizing a Hitatchi 500GB internal hard drive.&lt;/p&gt;
&lt;p&gt;Nothing fancy but it had finally gotten to the point where to boot up the laptop it was taking 5 minutes to get to the login screen and then another 5 minutes to get logged in. Not exactly what you need when you already have one thousand fires burning that need put out.&lt;/p&gt;
&lt;/div&gt;
&lt;div style="float: left;"&gt;
&lt;p&gt;&lt;iframe style="height: 240px; width: 192px;" src="http://rcm.amazon.com/e/cm?lt1=_blank&amp;amp;bc1=000000&amp;amp;IS2=1&amp;amp;bg1=FFFFFF&amp;amp;fc1=000000&amp;amp;lc1=0000FF&amp;amp;t=progsedge-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;m=amazon&amp;amp;f=ifr&amp;amp;ref=tf_til&amp;amp;asins=B009NHAF06" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" align="left"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;After doing a little research and shopping around I finally settled on the Samsung 840 Series. I have had pretty good luck in the past with Samsung products in the past and the reviews were all pretty good.&lt;/p&gt;
&lt;p&gt;I did have a concern about the SSD bricking on me since we have one person in our office that had to go through that experience. So after doing a little more research I settled on the option to do the following:&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="float: left;"&gt;&lt;ol style="font-size: 16px; padding-bottom: 20px; padding-left: 20px;"&gt;
&lt;li&gt;Clear off all of my documents etc. etc. off onto an external drive to bring the size of my files down.&lt;/li&gt;
&lt;li&gt;Clone the mechanical hard drive onto the SSD and place the SSD in the laptop drive bay.&lt;/li&gt;
&lt;li&gt;Wipe the mechanical hard drive and reformat.&lt;/li&gt;
&lt;li&gt;Purchase a drive caddy for the optical bay similar to this one &lt;a href="http://www.amazon.com/gp/product/B005L91ZL8/ref=as_li_tf_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B005L91ZL8&amp;amp;linkCode=as2&amp;amp;tag=progsedge-20"&gt;9.5mm IDE Optical Bay Adapter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Take out the optical drive and replace with the mechanical drive + drive caddy combo to hold my files and backup of SSD&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The plan went so-so until I had to clone the old drive over to the new SSD. Yikes! Talk about pulling your hair out. I thought it would be pretty straight forward to do this with a $40 kit I picked up from Best Buy. Basically, hook the drive up with the cable&amp;hellip;run their software&amp;hellip;and presto! Except that for some unknown reason it would copy over something or another from the MBR and the SSD drive would technically be &amp;ldquo;semi-cloned&amp;rdquo; but wouldn&amp;rsquo;t boot up. Of course, thinking that I had done something wrong, I spent a good number of hours going back and retrying this process and searching on support forums trying to figure out the magic formula.&lt;/p&gt;
&lt;p&gt;Ultimately, I decided to use another product. This time I went with &lt;a href="http://www.amazon.com/gp/product/B0095C25Y8/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B0095C25Y8&amp;amp;linkCode=as2&amp;amp;tag=progsedge-20"&gt;Acronis True Image 2013&lt;/a&gt;&lt;img style="margin: 0px; border-style: none !important;" src="http://www.assoc-amazon.com/e/ir?t=progsedge-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B0095C25Y8" alt="" width="1" height="1" border="0" /&gt; . Now this was a really great product and super easy to use. So you may see a follow-up review on this in the future. Basically, it did what the special cable/software combo was supposed to do and in the matter of a couple of hours I was finally up and running on the new SSD.&lt;/p&gt;
&lt;p&gt;So the bigger question is.. &amp;ldquo;Was it worth it?&amp;rdquo; . I hate to get all technical with I/O stats and such&amp;nbsp; so let me make it fairly simple to understand the the performance improvements. Now please remember that this laptop is running Windows 8, Intel Core i5 processor, and has 8GB of memory. So your mileage may vary.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style="width: 528px;" border="1" cellspacing="0" cellpadding="10"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="100"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td valign="top" width="100"&gt;Boot-up&lt;/td&gt;
&lt;td valign="top" width="100"&gt;Log-in&lt;/td&gt;
&lt;td valign="top" width="226"&gt;Visual Studio 2012&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="100"&gt;Mechanical&lt;/td&gt;
&lt;td valign="top" width="100"&gt;5 min&lt;/td&gt;
&lt;td valign="top" width="100"&gt;5 min&lt;/td&gt;
&lt;td valign="top" width="226"&gt;1-2 minutes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="100"&gt;SSD&lt;/td&gt;
&lt;td valign="top" width="100"&gt;15 seconds&lt;/td&gt;
&lt;td valign="top" width="100"&gt;8 seconds&lt;/td&gt;
&lt;td valign="top" width="226"&gt;12 seconds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also take note that the difference was not from some kind of cleanup effort or such. I had already tried to do numerous cleanup, defragging, blah blah blah session with the mechanical and it still sucked. So when you look at the chart above and say&amp;hellip;Wow! 5 minutes to boot up and 5 minutes to log in&amp;hellip; that is literally what it took. I would come in&amp;hellip;boot up&amp;hellip;go get coffee..come back and start to login&amp;hellip;and then walk around the office to talk to people or play a game of chess on my Windows Phone.&lt;/p&gt;
&lt;p&gt;I have a LOT of applications/databases/etc. loaded onto this machine so it is a heavy, heavy developer load. I mean I JUST uninstalled SQL Server 2000 and Visual Studio 2003! So don&amp;rsquo;t label it as an impossibility.&lt;/p&gt;
&lt;p&gt;So if you are looking for a way that you can breathe new life into that old laptop you may give this Samsung 840 a try. For under $200.00 it is a pretty good bargain.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;AJ&lt;/p&gt;
&lt;/div&gt;&lt;div class="col span_2_of_3 authorpanel"&gt;
&lt;div class="col span_1_of_3"&gt;
&lt;img src="http://www.programmersedge.com/Files/Arie_ProfilePic.jpg" class="authorimage" /&gt;
&lt;/div&gt;
&lt;div class="col span_2_of_3"&gt;
&lt;p&gt;&lt;strong&gt;Author profile:&lt;/strong&gt;&lt;a&gt;Arie Jones&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is the Director of Emerging Technologies for Perpetual Technologies, Inc in Indianapolis, IN. where he regales his other team members with fanciful tales of database and development lore. AJ specializes in SQL Server and application development technologies ...and especially likes all topics that include talk of Silverlight. &lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=BKg7LXh3GBs:Fq-p_WP20a8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=BKg7LXh3GBs:Fq-p_WP20a8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=BKg7LXh3GBs:Fq-p_WP20a8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=BKg7LXh3GBs:Fq-p_WP20a8:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/ProgrammersEdge?a=BKg7LXh3GBs:Fq-p_WP20a8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/ProgrammersEdge?i=BKg7LXh3GBs:Fq-p_WP20a8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammersEdge/~4/BKg7LXh3GBs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ProgrammersEdge/~3/BKg7LXh3GBs/post.aspx</link>
      <comments>http://www.programmersedge.com/post/2013/01/28/Review-Samsung-840-Series-250GB-Sata-III-Solid-State-Drive.aspx#disqus_thread</comments>
      <guid isPermaLink="false">http://www.programmersedge.com/post.aspx?id=573b804a-4db6-4268-882f-78e88cbcc5f5</guid>
      <pubDate>Mon, 28 Jan 2013 08:39:00 -0400</pubDate>
      <category>Reviews</category>
      <dc:publisher>Arie</dc:publisher>
      <pingback:server>http://www.programmersedge.com/pingback.axd</pingback:server>
      <pingback:target>http://www.programmersedge.com/post.aspx?id=573b804a-4db6-4268-882f-78e88cbcc5f5</pingback:target>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://www.programmersedge.com/trackback.axd?id=573b804a-4db6-4268-882f-78e88cbcc5f5</trackback:ping>
      <wfw:comment>http://www.programmersedge.com/post/2013/01/28/Review-Samsung-840-Series-250GB-Sata-III-Solid-State-Drive.aspx#disqus_thread</wfw:comment>
      <wfw:commentRss>http://www.programmersedge.com/syndication.axd?post=573b804a-4db6-4268-882f-78e88cbcc5f5</wfw:commentRss>
    <feedburner:origLink>http://www.programmersedge.com/post.aspx?id=573b804a-4db6-4268-882f-78e88cbcc5f5</feedburner:origLink></item>
  </channel>
</rss>
