<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" gd:etag="W/&quot;CEcBQXk4fip7ImA9WhFTGUs.&quot;"><id>tag:blogger.com,1999:blog-7656888</id><updated>2013-06-11T08:47:30.736-06:00</updated><category term="GIS" /><category term="Funnies" /><category term="Visual Studio" /><category term="MVVM" /><category term="Metro" /><category term="SQL" /><category term="Recycled" /><category term="Hyundai Santa Fe" /><category term="Prism" /><category term="web" /><category term="books" /><category term="Visual Learning Systems" /><category term="Mio" /><category term="elections" /><category term="BizTalk" /><category term="VS 2010" /><category term="Misc" /><category term="Windows" /><category term="algorithms" /><category term="Beer" /><category term="MSI" /><category term="Words" /><category term="VC++" /><category term="Testing" /><category term="Embedded" /><category term="Note To Self" /><category term="dell" /><category term="JQuery" /><category term="Stocks 50/200" /><category term="Games" /><category term="Baby" /><category term="Graphics" /><category term="ad music" /><category term="WebApi" /><category term="AI" /><category term="Halo 3" /><category term="VS 2011" /><category term="software engineering" /><category term="Mac" /><category term="Denver" /><category term="work" /><category term="Workflow Foundation" /><category term="facebook" /><category term="VS 2008" /><category term="linq" /><category term="business" /><category term="Tools and Utilities" /><category term="start up" /><category term="Vote" /><category term="iis" /><category term="DPM" /><category term="iPhone - Tips n Tricks" /><category term="Tips N Tricks" /><category term="Entrepreneur" /><category term="QA" /><category term="LIDAR Analyst" /><category term="security" /><category term="customer service" /><category term="VS 2012" /><category term="Yahoo Maps" /><category term="holiday" /><category term="Wii" /><category term="improvement" /><category term="Developer" /><category term="TOAD" /><category term="ideas" /><category term="LASIK" /><category term="OpenID" /><category term="WinRT" /><category term="Regex" /><category term="Maps" /><category term="iPhone" /><category term="Agile" /><category term="DotNetNuke" /><category term="SSRS" /><category term="Scrum" /><category term="Auto" /><category term="GPS" /><category term="design" /><category term="Hp Touchpad" /><category term="ASP.Net" /><category term="JavaScript" /><category term="software architect" /><category term="PhotoSynth" /><category term="LIDAR" /><category term="XBOX" /><category term="Entity Framework" /><category term=".NET" /><category term="screencast" /><category term="Mocks" /><category term="Windows Mobile" /><category term="Vista" /><category term="reflection" /><category term="Interstate Road Conditions" /><category term="Microsoft" /><category term="Windows 8" /><category term="MVC" /><category term="WIF" /><category term="Personal Development" /><category term="Technology" /><category term="SQL Server" /><category term="Virtual Earth" /><category term="Windows Store" /><category term="AJAX" /><category term="colorado" /><category term="GDAL" /><category term="iPhone Apps" /><category term="Oracle" /><category term="Ads" /><category term="Politics" /><category term="Windows Phone" /><category term="PowerShell" /><category term="Google Earth" /><category term="Chrome" /><category term="biology" /><category term="Links" /><category term="internet" /><category term="Software" /><category term="VSTS DB" /><category term="Money" /><category term="EntLib" /><category term="Dynamics CRM" /><category term="database" /><category term="science" /><category term="presentations" /><category term="car" /><category term="Windows 7" /><category term="linux" /><category term="debug" /><category term="CRM 2011" /><category term="Feature Analyst" /><category term="Licensing" /><category term="software management" /><category term="PCI" /><category term="Cloud Computing" /><category term=".net 4.5" /><category term="photography" /><category term="TFS" /><category term="ASP.Net Databases" /><category term="Imaging" /><category term="ArcGIS" /><category term="Gadgets" /><category term="WP7" /><category term="music" /><category term="Phone" /><category term="Google" /><category term="Open Source" /><category term="C#" /><category term="OptiRoute" /><category term="Bing" /><category term="WCF" /><category term="how-tos" /><category term="quotes" /><category term="IE" /><category term="Code Sample" /><category term="machine learning" /><category term="Govt" /><category term="WPF" /><category term="TED" /><category term="Silverlight" /><title>Aggregated Intelligence</title><subtitle type="html">AI - Aggregation of ideas</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>1728</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/aggregatedIntelligence" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="aggregatedintelligence" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>39.731286</geo:lat><geo:long>-104.98306</geo:long><entry gd:etag="W/&quot;CEcBQXk_eSp7ImA9WhFTGUs.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-5854407924475283813</id><published>2013-06-11T08:42:00.001-06:00</published><updated>2013-06-11T08:47:30.741-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-06-11T08:47:30.741-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>C# - Why you must never lock on this</title><content type="html">&lt;p&gt;You should never lock on “this” if this points to an instance of a publicly accessible class. The reason is that if the class is publicly accessible, then you have no control over whether someone else who uses your class, uses the instance for locking. And if they do lock an instance of your class, then you will end up in a dead-lock.&lt;/p&gt; &lt;p&gt;Here is some simple code to illustrate this:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;using System.Threading.Tasks;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;void Main()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClassTest test = new ClassTest();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lock(test) &lt;strong&gt;//locking on the instance of ClassTest&lt;br&gt;&lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parallel.Invoke (new Action[]{() =&amp;gt; test.DoWorkUsingThisLock(1)});&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public class ClassTest&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void DoWorkUsingThisLock(int i)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Before ClassTest.DoWorkUsingThisLock " + i);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lock(this) &lt;font color="#ff0000"&gt;&lt;strong&gt;//this is bad - this will never end - you have been deadlocked!&lt;/strong&gt;&lt;br&gt;&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("ClassTest.DoWorkUsingThisLock " + i);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.Sleep(1000);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("ClassTest.DoWorkUsingThisLock Done " + i);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;From MSDN:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;In general, avoid locking on a public type, or instances beyond your code's control. The common constructs lock (this), lock (typeof (MyType)), and lock ("myLock") violate this guideline: &lt;ul&gt; &lt;li&gt; &lt;p&gt;lock (this) is a problem if the instance can be accessed publicly.&lt;/p&gt; &lt;li&gt; &lt;p&gt;lock (typeof (MyType)) is a problem if MyType is publicly accessible.&lt;/p&gt; &lt;li&gt; &lt;p&gt;lock("myLock") is a problem because any other code in the process using the same string, will share the same lock.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/c5kehkcz(v=vs.110).aspx"&gt;Lock Statement (MSDN)&lt;/a&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/5854407924475283813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=5854407924475283813&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/5854407924475283813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/5854407924475283813?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/06/c-why-you-must-never-lock-on-this.html" title="C# - Why you must never lock on this" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0MHRXw9eCp7ImA9WhBaF0w.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-7151360632144259772</id><published>2013-05-27T21:23:00.001-06:00</published><updated>2013-05-27T21:23:54.260-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-27T21:23:54.260-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="software engineering" /><category scheme="http://www.blogger.com/atom/ns#" term="Software" /><category scheme="http://www.blogger.com/atom/ns#" term="Misc" /><title>The 14 characters you meet as a coder–InfoWorld</title><content type="html">&lt;p&gt;Ran into this article on &lt;a href="http://www.infoworld.com/d/application-development/the-14-characters-you-meet-coder-218142" target="_blank"&gt;InfoWorld&lt;/a&gt; and it was too funny to not share:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.infoworld.com/d/application-development/the-14-characters-you-meet-coder-218142?page=0,0"&gt;http://www.infoworld.com/d/application-development/the-14-characters-you-meet-coder-218142?page=0,0&lt;/a&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;The Developer Diva. &lt;/strong&gt;Great software is rarely a one-person effort. There are users, plus the testers, plus the crew who markets or sells the work. But the Developer Diva recognizes those efforts in the same way actors who win Oscars thank the "little people." Developer Divas are not satisfied with standard accommodations; they need to be pampered. In fact, someone in management needs to devote at least 50 percent of his or her time to listen to the diva's complaints and get the diva to produce. If that management load increases every time the Developer Diva acquires a new skill, perhaps it's time to send the diva packing, even if the replacement is a little less skilled. &lt;p&gt;&lt;strong&gt;The Rock Star. &lt;/strong&gt;Generally this guy &lt;a href="http://www.infoworld.com/d/application-development/6-home-truths-about-rockstar-developers-205098"&gt;knows HTML and JavaScript or maybe PHP&lt;/a&gt;, but from the ego you'd think he just set down his Les Paul after headlining at Madison Square Garden. After his 15 minutes are up, the crashing ego isn't pretty. &lt;p&gt;&lt;strong&gt;The Reluctant Programmer. &lt;/strong&gt;Rather than urge their kids to be doctors or lawyers, some parents push their progeny to go into software development. Sometimes it works out. And sometimes the poor, benighted offspring gaze out of the office window yearning for hard labor in the 95-degree heat -- anything except spending their lives doing something they don't want to do, whether or not they have the aptitude for it. Usually their work is mediocre, and they're out the door every day at 4:55 p.m. sharp. &lt;p&gt;&lt;strong&gt;The Holy Priest. &lt;/strong&gt;This person revels in technology for its own sake and has no patience for the hapless techno weenies who don't spend their days chanting arcane invocations using terms like "regex," "SOAP," "asynchronous messaging," "n-tier architecture," and "CORBA." Holy Priests recognize opinions as valid only if they come from fellow clerics, and they express contempt for "lusers" at every opportunity. They may be brilliant coders, but keep them locked in the closet, far away from customers. &lt;p&gt;&lt;strong&gt;The Process Guru. &lt;/strong&gt;You might wonder who would spend all their time reading books on the latest development methodologies. That would be the Process Guru, who knows more about &lt;a href="http://www.infoworld.com/d/application-development/whats-wrong-agile-development-culture-people-top-the-list-213480"&gt;Scrum&lt;/a&gt;, XP, RUP, Crystal, PSP, TSP, and COCOMO than the rest of your organization put together. The guru is interested only in the process of creating software and cares nothing about the output of said process. Consuming every minute of every meeting, the Process Guru likes to explain how "we're doing agile wrong" and pontificates about the need for more agile training. Usually, but not always, the Process Guru is recognizable by the Certified Scrum Master status. &lt;p&gt;&lt;strong&gt;The "Jeopardy" Champion. &lt;/strong&gt;The expert on arcane trivia, this developer may or may not be generally productive, but stands as the one person on the team who always seems to possess some obscure bit of needed knowledge. Whether it's the details of how "volatile" works in Java, both before and after the changes to the memory model spec, or deep knowledge of tuning a JBoss AS 4.2.3 configuration, the "Jeopardy" Champion is a valuable asset (at least twice a year). &lt;p&gt;&lt;strong&gt;The Hipster Hacker from Hell. &lt;/strong&gt;We really need to rewrite all of our software in Haskell because then our code will be beautiful. Never mind the costs! Did I say Haskell? Haskell was so last year. I mean &lt;a href="http://www.infoworld.com/d/application-development/clojure-inventor-hickey-now-aims-android-189105"&gt;Clojure&lt;/a&gt; because it will be simple! Bugs? Features? I have no time for such trivial matters. I have a whole new architecture to write in &lt;a href="http://www.infoworld.com/d/application-development/first-look-gavin-kings-ceylon-217197"&gt;Ceylon&lt;/a&gt;! &lt;p&gt;&lt;strong&gt;The Architecture Astronaut.&lt;/strong&gt; This developer loves complexity and never sees a problem too simple to deserve a multitier, distributed system using a Java application server, multiple message queues, SOAP-based Web services with distributed transactions, and native code in C++ for good measure. When not designing byzantine architectures, astronauts immerse themselves in the WS-* specs or CORBA manuals. They may be found associating with Hipster Hackers from Hell, scheming up a new distributed system built in a combination of Erlang, Scala + Akka, Node.js, and Haskell. The astronaut will try to spend at least half of the allocated time for the project drawing UML diagrams and "fleshing out the architecture." Mantra: "The project isn't done until it uses at least 7/8 of the patterns in the &lt;a href="http://c2.com/cgi/wiki?GangOfFour"&gt;GoF&lt;/a&gt; book." &lt;p&gt;&lt;strong&gt;The Insecure Evangelist. &lt;/strong&gt;This guy/gal designed the entire system, but is threatened by new suggestions from just about anybody. Basically, my ideas are good and yours are bad, unless I repackage them as my ideas. &lt;p&gt;&lt;strong&gt;The Code Poet. &lt;/strong&gt;The poet's code is elegant and conforms beautifully to design patterns. On the other hand, the Code Poet holds you up in meetings forever and never notices the missed deadlines or the annoyed looks on other peoples' faces. &lt;p&gt;&lt;strong&gt;The Cloud Zealot. &lt;/strong&gt;This character has never heard of (or doesn't believe in) &lt;a href="http://nighthacks.com/roller/jag/resource/Fallacies.html"&gt;the eight fallacies of distributed computing&lt;/a&gt; and couldn't spell "SLA" if you spotted him the "S," "L," and "A." However, they can leap on a trending buzzword like a lion stalking a gazelle on the savannah. The Cloud Zealot races to move everything "to the cloud" with no regard for security, latency, network outages, data interoperability, vendor lock-in, or the long-term viability of the SaaS vendor du jour. Secure in his knowledge that no fly-by-night SaaS offering has ever been hacked, leaking usernames, email addresses, and unencrypted passwords for every user account, the Cloud Zealot sleeps easy. Lucky for him, he'll have moved on to a new company before you discover that all of your employees identities are for sale by the Russian mafia. &lt;p&gt;&lt;strong&gt;The Traditionalist. "&lt;/strong&gt;Why would you ever need anything other than Java and an Oracle DB?" "You should definitely run your application on WebSphere." "Oh, you want to send messages between nodes? Let me prepare the XML schema." &lt;p&gt;&lt;strong&gt;The Uber Traditionalist. &lt;/strong&gt;This party thinks Java is too newfangled and unproven for production use, preferring to develop on an AS/400, in RPG, using the SEU. The UT spends most of his time regaling you with tales of his youth, when the VAX was still a technological marvel and the PC was yet to be born. He probably built his first computer from raw transistors on a breadboard and never hesitates to remind the Hipster Hacker from Hell (his mortal enemy) that "the ideas in Node.js were originally developed in SNOBOL in the '70s, you know" or "Haskell is just a less pure and inferior LISP in many ways." &lt;p&gt;&lt;strong&gt;The Proprietary Priest.&lt;/strong&gt; Telltale signs: Insists that all solutions should use proprietary tools from a trusted name; Perforce, Websphere, AIX, Oracle -- you get the idea. If Microsoft, IBM, or some other corporation didn't write it, then it must be crap.&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/7151360632144259772/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=7151360632144259772&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7151360632144259772?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7151360632144259772?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/05/the-14-characters-you-meet-as.html" title="The 14 characters you meet as a coder–InfoWorld" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkIMQHs5fip7ImA9WhBUEkQ.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-8309109130955904622</id><published>2013-04-29T23:09:00.001-06:00</published><updated>2013-04-29T23:09:41.526-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-29T23:09:41.526-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVVM" /><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="Prism" /><title>Controls that implement WPF Commanding</title><content type="html">&lt;p&gt;I was trying to find a quick list of the basic WPF controls that support commanding (so that I could expose a DelegateCommand from my ViewModel to which I could bind the view). What I found out was that “generally” commands that support commanding implement ICommandSource. Based on that info, I was able to generate the following list of controls that implement ICommandSource:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;System.Windows.Input.&lt;strong&gt;InputBinding&lt;/strong&gt;&lt;br&gt;System.Windows.Input.&lt;strong&gt;KeyBinding&lt;/strong&gt;&lt;br&gt;System.Windows.Input.&lt;strong&gt;MouseBinding&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.&lt;strong&gt;MenuItem&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.&lt;strong&gt;Button&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;ToggleButton&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.&lt;strong&gt;CheckBox&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.&lt;strong&gt;GridViewColumnHeader&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;CalendarButton&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;CalendarDayButton&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;DataGridColumnHeader&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;DataGridRowHeader&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.Primitives.&lt;strong&gt;RepeatButton&lt;/strong&gt;&lt;br&gt;System.Windows.Controls.&lt;strong&gt;RadioButton&lt;/strong&gt;&lt;br&gt;System.Windows.Documents.&lt;strong&gt;Hyperlink&lt;/strong&gt;&lt;br&gt;System.Windows.Shell.&lt;strong&gt;ThumbButtonInfo&lt;/strong&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;MS.Internal.Documents.DocumentGridContextMenu+EditorMenuItem&lt;br&gt;System.Windows.Documents.TextEditorContextMenu+EditorMenuItem&lt;br&gt;System.Windows.Documents.TextEditorContextMenu+ReconversionMenuItem&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;More info:&lt;/p&gt; &lt;p&gt;MSDN: commanding overview: &lt;a href="http://msdn.microsoft.com/en-us/library/ms752308.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms752308.aspx&lt;/a&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/8309109130955904622/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=8309109130955904622&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8309109130955904622?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8309109130955904622?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/04/controls-that-implement-wpf-commanding.html" title="Controls that implement WPF Commanding" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QARHc-fyp7ImA9WhBQFkk.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-3421622647171729079</id><published>2013-03-18T17:28:00.001-06:00</published><updated>2013-03-18T17:29:05.957-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-18T17:29:05.957-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Convert an Anonymous type object to a dictionary</title><content type="html">&lt;p&gt;I wanted to write a method that would take an anonymous object and have it spit out key,value pairs from the properties defined on that anonymous object.&lt;/p&gt; &lt;p&gt;For example:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;new {j="j1",k="k1"}&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Should create a dictionary with 2 keys (j,k) which have corresponding values of (j1,k1).&lt;/p&gt; &lt;p&gt;A while back I had written about an helper method that would convert all the properties on an object into a dictionary: &lt;a title="http://blog.aggregatedintelligence.com/2013/01/convert-objects-property-values-to.html" href="http://blog.aggregatedintelligence.com/2013/01/convert-objects-property-values-to.html"&gt;http://blog.aggregatedintelligence.com/2013/01/convert-objects-property-values-to.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It turns out that the same method can be used even for anonymous types!&lt;/p&gt;&lt;iframe style="border-bottom-style: none; border-left-style: none; width: 100%; border-top-style: none; height: 500px; border-right-style: none" src="http://pastebin.com/embed_iframe.php?i=J6zdDjN4"&gt;&lt;/iframe&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/3421622647171729079/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=3421622647171729079&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/3421622647171729079?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/3421622647171729079?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/convert-anonymous-type-object-to.html" title="Convert an Anonymous type object to a dictionary" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck8BRn4-fyp7ImA9WhBQEEg.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-1175493980218457909</id><published>2013-03-11T19:04:00.001-06:00</published><updated>2013-03-11T19:14:17.057-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-11T19:14:17.057-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Did you know–XOR swap algorithm?</title><content type="html">&lt;p&gt;Did you know that you can use the XOR operator to swap the values in 2 variables without the use of a 3rd variable?&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Check it out:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;int x = 111;&lt;br&gt;int y = 3333;&lt;/p&gt; &lt;p&gt;x ^= y;&lt;br&gt;y ^= x;&lt;br&gt;x ^= y;&lt;/p&gt; &lt;p&gt;x.Dump();&lt;br&gt;y.Dump();&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Outputs:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;3333&lt;br&gt;111&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/1175493980218457909/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=1175493980218457909&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/1175493980218457909?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/1175493980218457909?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/did-you-knowxor-swap-algorithm.html" title="Did you know–XOR swap algorithm?" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkYDR308eCp7ImA9WhBRGUs.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-2516787991287242337</id><published>2013-03-10T18:02:00.001-06:00</published><updated>2013-03-10T18:02:56.370-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-10T18:02:56.370-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>MemoryStream exception–Memory stream is not expandable</title><content type="html">&lt;p&gt;Just got hit by this exception.&lt;/p&gt; &lt;p&gt;I was creating a memory stream from bytes that I had read from a file:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Consolas"&gt;var fileBytes = File.ReadAllBytes(filePath);&lt;br&gt;MemoryStream ms = new MemoryStream(fileBytes, true);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The memory stream was then being used in a bunch of operations that could add data and when it did, it caused the “Memory stream is not expandable” exception to be thrown.&lt;/p&gt; &lt;p&gt;Found out that its because of the constructor that I was using. Because I was providing memory-stream the actual bytes, it was creating the memory stream as a non-expandable one. Instead, if you construct it and then write to it, the memory stream has no such restriction and it can expand.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Consolas"&gt;MemoryStream ms = new MemoryStream();&lt;br&gt;ms.Write(fileBytes, 0, fileBytes.Length);&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/2516787991287242337/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=2516787991287242337&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/2516787991287242337?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/2516787991287242337?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/memorystream-exceptionmemory-stream-is.html" title="MemoryStream exception–Memory stream is not expandable" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0cCRHsyfSp7ImA9WhBRFEs.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-3808786375574229811</id><published>2013-03-04T22:24:00.001-07:00</published><updated>2013-03-04T22:24:25.595-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-04T22:24:25.595-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Funnies" /><title>Dilbert–Gratuitous displays of mental superiority!</title><content type="html">&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-R3z_mvfPM0s/UTWBhhMuWOI/AAAAAAAAQNA/CXUv78srD60/s1600-h/asoksmart%25255B2%25255D.jpg"&gt;&lt;img title="Dilbert - Asok - Gratuitous displays" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="but I try not to frighten ordinary people with any gratuitous displays of mental superiority" src="http://lh4.ggpht.com/-kHw5ZuRJEmg/UTWBiNRm5WI/AAAAAAAAQNI/xSvb97gXFkE/asoksmart_thumb.jpg?imgmax=800" width="176" height="172"&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/3808786375574229811/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=3808786375574229811&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/3808786375574229811?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/3808786375574229811?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/dilbertgratuitous-displays-of-mental.html" title="Dilbert–Gratuitous displays of mental superiority!" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-kHw5ZuRJEmg/UTWBiNRm5WI/AAAAAAAAQNI/xSvb97gXFkE/s72-c/asoksmart_thumb.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkUBRHc4eSp7ImA9WhBRFEQ.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-1674304391309711127</id><published>2013-03-04T12:29:00.001-07:00</published><updated>2013-03-05T08:44:15.931-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-05T08:44:15.931-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Prism" /><title>UnityBootstrapper–Order in which methods are called</title><content type="html">&lt;p&gt;The MSDN documentation page “&lt;a href="http://msdn.microsoft.com/en-us/library/gg430868(v=pandp.40).aspx"&gt;Initializing Prism Applications&lt;/a&gt;” shows the basic stages of the bootstrapping process, but it leaves out when some of the methods that can be overriden get called.&lt;/p&gt; &lt;p&gt;Process as defined in MSDN:&lt;/p&gt; &lt;p&gt;&lt;img alt="Gg430868.544A7BF3FF93BE95A370A3D97774244A(en-us,PandP.40).png" src="http://i.msdn.microsoft.com/dynimg/IC448593.png"&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Here is the order in which all methods that can be overridden are called:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Run (called typically when app is starting up) &lt;li&gt;CreateLogger &lt;li&gt;CreateModuleCatalog &lt;li&gt;ConfigureModuleCatalog &lt;li&gt;CreateContainer &lt;li&gt;ConfigureContainer &lt;li&gt;ConfigureServiceLocator &lt;li&gt;ConfigureRegionAdapterMappings &lt;li&gt;ConfigureDefaultRegionBehaviors &lt;li&gt;RegisterFrameworkExceptionTypes &lt;li&gt;Create Shell &lt;li&gt;InitializeShell &lt;li&gt;InitializeModules&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;And here is logging output of the Prism bootstrapper process (where UnityLoggerFacade is a logging class that I created):&lt;/p&gt; &lt;p&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Logger was created successfully.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Creating module catalog.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Configuring module catalog.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Creating Unity container.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Configuring the Unity container.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Adding UnityBootstrapperExtension to container.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Configuring ServiceLocator singleton.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Configuring region adapters.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Configuring default region behaviors.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Registering Framework Exception Types.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Creating the shell.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Setting the RegionManager.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Updating Regions.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Initializing the shell.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Initializing modules.&lt;br&gt;UnityLoggerFacade&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Bootstrapper sequence completed.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/1674304391309711127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=1674304391309711127&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/1674304391309711127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/1674304391309711127?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/unitybootstrapperorder-in-which-methods.html" title="UnityBootstrapper–Order in which methods are called" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4EQHw5eyp7ImA9WhBRE0o.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-6346085759895425758</id><published>2013-03-03T21:21:00.001-07:00</published><updated>2013-03-03T21:21:41.223-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-03T21:21:41.223-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="QA" /><category scheme="http://www.blogger.com/atom/ns#" term="Testing" /><title>Bugs by BugBash</title><content type="html">&lt;p&gt;&lt;img title="bug-bash20050521" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="bug-bash20050521" src="http://lh5.ggpht.com/-8A5EmKuFDpo/UTQhVDU8g9I/AAAAAAAAQMw/zHvRXhOyy4E/bug-bash20050521%25255B4%25255D.gif?imgmax=800" width="734" height="249"&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/6346085759895425758/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=6346085759895425758&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6346085759895425758?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6346085759895425758?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/03/bugs-by-bugbash.html" title="Bugs by BugBash" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-8A5EmKuFDpo/UTQhVDU8g9I/AAAAAAAAQMw/zHvRXhOyy4E/s72-c/bug-bash20050521%25255B4%25255D.gif?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UEQX0yfip7ImA9WhBREE0.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-7199322533014485058</id><published>2013-02-27T15:46:00.001-07:00</published><updated>2013-02-27T15:46:40.396-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-27T15:46:40.396-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>Telerik ASP.Net MVC Grid–Ajax binding boolean property</title><content type="html">&lt;p&gt;When you bind a collection of objects that have a boolean property on them and if you use server side binding, the columns are automatically rendered as check-boxes. But instead, if you use AJAX binding with the telerik MVC grid, they get rendered as literal texts (“true” or “false”). To fix it, what you need to do is to set the ClientTemplate. Here is an example:&lt;/p&gt;grid.Columns(columns =&amp;gt; {&lt;br&gt;columns.Bound(o =&amp;gt; o.Value).ClientTemplate("&amp;lt;input type='checkbox' &lt;font style="background-color: #ffff00"&gt;&amp;lt;#=&lt;strong&gt;Value&lt;/strong&gt;?'checked':''#&amp;gt;&lt;/font&gt; disabled /&amp;gt;"); &lt;p&gt;Where the code that’s highlighted is the binding code and “Value” is the property to which I am binding. Also, I am using the ternary operator to output “&lt;strong&gt;checked:’’&lt;/strong&gt;” if its true, else it outputs nothing.&lt;/p&gt;&lt;pre&gt;
&lt;/pre&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/7199322533014485058/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=7199322533014485058&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7199322533014485058?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7199322533014485058?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/telerik-aspnet-mvc-gridajax-binding.html" title="Telerik ASP.Net MVC Grid–Ajax binding boolean property" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEENRH05fyp7ImA9WhBSF0s.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-8005147014750586435</id><published>2013-02-24T20:24:00.001-07:00</published><updated>2013-02-24T20:24:55.327-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-24T20:24:55.327-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><title>Javascript–Convert URLs in text to links</title><content type="html">&lt;p&gt;Was looking for some code to convert urls in strings to url anchors. Came across &lt;a href="http://jmrware.com/articles/2010/linkifyurl/linkify.html"&gt;this post&lt;/a&gt; (JMRWare) and below is the extracted code for javascript:&lt;/p&gt;&lt;iframe style="border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none; width: 100%;height:500px;" src="http://pastebin.com/embed_iframe.php?i=mXkfirjY"&gt;&lt;/iframe&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/8005147014750586435/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=8005147014750586435&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8005147014750586435?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8005147014750586435?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/javascriptconvert-urls-in-text-to-links.html" title="Javascript–Convert URLs in text to links" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU8GR3o7eyp7ImA9WhBSFEs.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-6243808992171212783</id><published>2013-02-21T10:30:00.001-07:00</published><updated>2013-02-21T10:30:26.403-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-21T10:30:26.403-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>ASP.Net MVC–Authorize filter that loads users and roles from the application configuration file</title><content type="html">&lt;p&gt;I needed the ability to set the Authorization filter from a config file (instead of setting the roles and users directly on the controller). The main reason for this is that I needed different roles to be authorized to hit the action based on the environment to which it was deployed (dev,qa, prod).&lt;/p&gt; &lt;p&gt;Here is the code:&lt;/p&gt; &lt;p&gt;&lt;iframe style="border-bottom-style: none; border-left-style: none; width: 100%; border-top-style: none; height: 500px; border-right-style: none" src="http://pastebin.com/embed_iframe.php?i=MjRmGuHv"&gt;&lt;/iframe&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/6243808992171212783/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=6243808992171212783&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6243808992171212783?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6243808992171212783?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/aspnet-mvcauthorize-filter-that-loads.html" title="ASP.Net MVC–Authorize filter that loads users and roles from the application configuration file" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUEMQX8yfSp7ImA9WhBSEE4.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-6738857057970978747</id><published>2013-02-16T11:01:00.001-07:00</published><updated>2013-02-16T11:01:20.195-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-16T11:01:20.195-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="reflection" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>C#–Determining if an object implements or derives from a generic class or interface</title><content type="html">&lt;p&gt;Imagine you have a generic class and interface that are defined as follows:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public abstract class MyGenericClass&amp;lt;T&amp;gt;&lt;br&gt;{&lt;br&gt;}&lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;public interface IMyGenericInterface&amp;lt;T&amp;gt;&lt;br&gt;{&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;If you were to derive or implement from the above class/interface, you will find that you cannot use the “is” keyword to determine if that class implements or derives from the above interface. Here is what I mean: If I were to implement/derive from the base class like so:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public class MyInt:MyGenericClass&amp;lt;int&amp;gt;&lt;br&gt;{&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public class MyInterfacedInt:IMyGenericInterface&amp;lt;int&amp;gt;&lt;br&gt;{&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Then I can do the following: (code will run in LinqPad)&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;MyInt myInt = new MyInt();&lt;br&gt;MyInterfacedInt myIInt = new MyInterfacedInt();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;(myInt is MyInt).Dump();//true&lt;br&gt;(myIInt is MyInterfacedInt).Dump();//true;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;(myInt is MyGenericClass&amp;lt;int&amp;gt;).Dump();//true&lt;br&gt;(myIInt is IMyGenericInterface&amp;lt;int&amp;gt;).Dump();//true;&lt;br&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;But I cannot do the following:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;//Will not compile&lt;br&gt;//(myInt is MyGenericClass&amp;lt;&amp;gt;).Dump();&lt;br&gt;//(myInt is IMyGenericInterface&amp;lt;&amp;gt;).Dump();&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Why is this important? If you plan on loading plugins at run time, then all you know is that they will implement an interface or a base class and you need to check that. One way around this would be to create a non-generic base class or interface and check against that. But that might not be a possibility if you are using a 3rd party API (eg: Prism and the CompositePresentationEvent&amp;lt;&amp;gt; type).&lt;/p&gt; &lt;p&gt;So here is a helper class that can do just that:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;static class &lt;strong&gt;ReflectionHelper&lt;/strong&gt;&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static bool &lt;strong&gt;IsDerivedOrImplementedFrom&lt;/strong&gt;&amp;lt;T&amp;gt;(this T objectToCheck, Type parentType) where T : class&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (objectToCheck == null)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (parentType.IsInstanceOfType(objectToCheck))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool checkingInterfaces = parentType.IsInterface;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type toCheck = objectToCheck.GetType();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (toCheck != null &amp;amp;&amp;amp; toCheck != typeof(object)) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cur = toCheck.IsGenericType ? toCheck.GetGenericTypeDefinition() : toCheck;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (checkingInterfaces)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool implementsParentInterface = toCheck.GetInterfaces()&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Any(ci =&amp;gt; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ci.IsGenericType ? ci.GetGenericTypeDefinition() == parentType :&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ci == parentType;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (implementsParentInterface)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (parentType == cur)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; toCheck = toCheck.BaseType;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And here is how you call it:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;static void Main(string[] args)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyInt myInt = new MyInt();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyInterfacedInt myIInt = new MyInterfacedInt();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Using the \"is\" keyword".Dump();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (myInt is MyInt).Dump();//true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (myIInt is MyInterfacedInt).Dump();//true;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (myInt is MyGenericClass&amp;lt;int&amp;gt;).Dump();//true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (myIInt is IMyGenericInterface&amp;lt;int&amp;gt;).Dump();//true;&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Will not compile&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //(myInt is MyGenericClass&amp;lt;&amp;gt;).Dump();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //(myInt is IMyGenericInterface&amp;lt;&amp;gt;).Dump();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Using IsDerivedOrImplementedFrom".Dump();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(MyInt)).Dump(); //true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(MyInterfacedInt)).Dump();//true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(MyGenericClass&amp;lt;int&amp;gt;)).Dump();//true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(IMyGenericInterface&amp;lt;int&amp;gt;)).Dump();//true&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(MyGenericClass&amp;lt;&amp;gt;)).Dump();//true&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(IMyGenericInterface&amp;lt;&amp;gt;)).Dump();//true&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Negative tests Using IsDerivedOrImplementedFrom".Dump();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(MyInterfacedInt)).Dump(); //false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(MyInt)).Dump();//false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(MyGenericClass&amp;lt;string&amp;gt;)).Dump();//false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(IMyGenericInterface&amp;lt;string&amp;gt;)).Dump();//false&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myInt.IsDerivedOrImplementedFrom(typeof(IMyGenericInterface&amp;lt;&amp;gt;)).Dump();//false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myIInt.IsDerivedOrImplementedFrom(typeof(MyGenericClass&amp;lt;&amp;gt;)).Dump();//false&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadLine();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Here is the full code: &lt;a title="http://pastebin.com/raw.php?i=Y2nSQc7V" href="http://pastebin.com/raw.php?i=Y2nSQc7V"&gt;http://pastebin.com/raw.php?i=Y2nSQc7V&lt;/a&gt;&lt;/p&gt;&lt;script src="http://pastebin.com/embed_js.php?i=Y2nSQc7V"&gt;&lt;/script&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/6738857057970978747/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=6738857057970978747&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6738857057970978747?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6738857057970978747?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/cdetermining-if-object-implements-or.html" title="C#–Determining if an object implements or derives from a generic class or interface" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk8CRHw5eip7ImA9WhBTE00.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-5532950721641770845</id><published>2013-02-07T23:27:00.001-07:00</published><updated>2013-02-07T23:27:45.222-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T23:27:45.222-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="linq" /><title>Linqer–Sql to Linq tool</title><content type="html">&lt;p&gt;Came across &lt;a href="http://sqltolinq.com/"&gt;Linqer&lt;/a&gt;, a Sql to LINQ conversion tool. From some preliminary tests, I found that it worked pretty well given some complex queries.&lt;/p&gt; &lt;p&gt;Unfortunately, there is no free version of the tool and it costs $60. This would be a fabulous tool within LinqPad. Hopefully someday LinqPad will include this functionality.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/5532950721641770845/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=5532950721641770845&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/5532950721641770845?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/5532950721641770845?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/linqersql-to-linq-tool.html" title="Linqer–Sql to Linq tool" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0UASHs5eSp7ImA9WhBTEkQ.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-9046700858085647455</id><published>2013-02-07T19:39:00.001-07:00</published><updated>2013-02-07T20:47:29.521-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-07T20:47:29.521-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips N Tricks" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Tools and Utilities" /><category scheme="http://www.blogger.com/atom/ns#" term="Developer" /><title>Syncfusion Succinctly Series of ebooks</title><content type="html">&lt;p&gt;I have been enjoying the SyncFusion suite of products for about 4 months now. Apart from a stellar set of UI tools, what I have liked about Syncfusion is the constant communication that they provide the developer community. One example of this is the Succintly series of e-books that they release periodically.&lt;/p&gt; &lt;p&gt;You can check out the list of books that they have at: &lt;a title="http://www.syncfusion.com/resources/techportal" href="http://www.syncfusion.com/resources/techportal"&gt;http://www.syncfusion.com/resources/techportal&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I found that the &lt;a href="http://www.syncfusion.com/resources/techportal/ebooks/jquery"&gt;jQuery&lt;/a&gt; and &lt;a href="http://www.syncfusion.com/resources/techportal/ebooks/javascript"&gt;Javascript&lt;/a&gt; books were useful for me as refreshers when I was getting back into Asp.Net MVC programming after spending a while in classic Asp.Net and Silverlight. In addition, I had provided the book on &lt;a href="http://www.syncfusion.com/resources/techportal/ebooks/datastructurespart1"&gt;data-structures&lt;/a&gt; to a junior developer at work and he liked it very much (and actually noted that it better explained some concepts than his teacher did). I am also interested in looking at the books on &lt;a href="http://www.syncfusion.com/resources/techportal/ebooks/objective-c"&gt;Objective-C&lt;/a&gt; and &lt;a href="http://www.syncfusion.com/resources/techportal/ebooks/gis"&gt;GIS&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Just about the only thing I hate about the succintly series is that I need to enter my contact information each time I get download a book from the series. (especially since I have already logged into the site).&lt;/p&gt; &lt;p&gt;Oh! and while you are on their site, get their &lt;a href="http://www.syncfusion.com/downloads/metrostudio"&gt;Metro Studio&lt;/a&gt; product for free. It’s the best free resource for metro style icons.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: I received a free copy of Syncfusion’s tools as a door prize at the Denver Visual Studio user group meeting and Syncfusion is also providing me a small cash compensation for this post. But, none of that influenced the comments in this post. I meant to post this as a resource long before I was contacted by Syncfusion.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/9046700858085647455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=9046700858085647455&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/9046700858085647455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/9046700858085647455?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/02/syncfusion-succinctly-series-of-ebooks.html" title="Syncfusion Succinctly Series of ebooks" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkUGRn46fSp7ImA9WhNaE0Q.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-4291567956179080317</id><published>2013-01-28T10:30:00.001-07:00</published><updated>2013-01-28T10:30:27.015-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-28T10:30:27.015-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Convert an object’s property values to a dictionary of string,object</title><content type="html">&lt;p&gt;Here is a simple helper function that converts any class object to a &lt;strong&gt;dictionary of string,object&lt;/strong&gt;, where the key is the PropertyName:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;public static class &lt;strong&gt;ReflectionHelper&lt;/strong&gt;&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static IDictionary&amp;lt;string, object&amp;gt; &lt;strong&gt;ToDictionary&lt;/strong&gt;&amp;lt;TModel&amp;gt;(this TModel model)&lt;br&gt;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BindingFlags publicAttributes = BindingFlags.Public | BindingFlags.Instance;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dictionary&amp;lt;string, object&amp;gt; dictionary = new Dictionary&amp;lt;string, object&amp;gt;();&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (PropertyInfo property in model.GetType().GetProperties(publicAttributes))&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (property.CanRead)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary.Add(property.Name, property.GetValue(model, null));&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dictionary;&lt;br&gt;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;public class Test&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Name{get;set;}&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;void Main()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test t = new Test{Name = "Raj Rao"};&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach(var v in t.ToDictionary())&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(v.Key + ":" + v.Value);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The output will be:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;Name: Raj Rao&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This again was inspired by some of the Helper functions available in Asp.Net’s MVC HTML helper class.&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/4291567956179080317/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=4291567956179080317&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4291567956179080317?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4291567956179080317?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/01/convert-objects-property-values-to.html" title="Convert an object’s property values to a dictionary of string,object" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUGRnY8eyp7ImA9WhNaE0Q.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-7820587594540456825</id><published>2013-01-28T10:13:00.001-07:00</published><updated>2013-01-28T10:13:47.873-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-28T10:13:47.873-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>Getting rid of magic strings that point at PropertyNames</title><content type="html">&lt;p&gt;Often times, you end up with code that includes magic strings that point at property names of a class. I hate this, because it normally ends up causing runtime errors instead of compile time errors.&lt;/p&gt; &lt;p&gt;While working with Asp.Net MVC, I found that you could pass properties to helper methods (such as Html.TextBoxFor) and it would automagically figure out the name of the property and use it to build out the ID and Name fields of the html object. I wanted something similar to that and here is my code:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;//The helper class that provides the “&lt;strong&gt;GetPropertyName&lt;/strong&gt;” method&lt;br&gt;public static class &lt;strong&gt;&lt;font style="background-color: #ffff00"&gt;ReflectionHelper&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static string &lt;strong&gt;&lt;font style="background-color: #ffff00"&gt;GetPropertyName&lt;/font&gt;&lt;/strong&gt;&amp;lt;TModel, TProperty&amp;gt;(this TModel model, Expression&amp;lt;Func&amp;lt;TModel, TProperty&amp;gt;&amp;gt; expression)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MemberExpression body = (MemberExpression) expression.Body;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return body.Member.Name;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;//A test class to test what we are doing&lt;br&gt;public class Test&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Name{get;set;}&lt;br&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font size="2" face="Courier New"&gt;//A simple test&lt;br&gt;void Main()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Test t = new Test();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(t.&lt;strong&gt;GetPropertyName&lt;/strong&gt;(&lt;strong&gt;&lt;em&gt;&lt;font style="background-color: #ffff00"&gt;m =&amp;gt; m.Name&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;));&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/7820587594540456825/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=7820587594540456825&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7820587594540456825?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7820587594540456825?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2013/01/getting-rid-of-magic-strings-that-point.html" title="Getting rid of magic strings that point at PropertyNames" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DkAERX0_cCp7ImA9WhNVGUo.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-4797541933409185223</id><published>2012-12-31T10:25:00.001-07:00</published><updated>2012-12-31T10:25:04.348-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-31T10:25:04.348-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><category scheme="http://www.blogger.com/atom/ns#" term="Tools and Utilities" /><title>Sql Server Schema Comparision tool: Open DBDiff</title><content type="html">&lt;p&gt;Came across a nice open source tool that allows you to perform schema compares on Sql-Server. I liked it and wanted to share it!&lt;/p&gt; &lt;p&gt;Link: &lt;a title="http://opendbiff.codeplex.com/" href="http://opendbiff.codeplex.com/"&gt;http://opendbiff.codeplex.com/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Description from the codeplex site: &lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Open DBDiff is an open source database schema comparison tool for SQL Server 2005/2008. &lt;br&gt;It reports differences between two database schemas and provides a synchronization script to upgrade a database from one to the other.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://opendbiff.codeplex.com/"&gt;&lt;img title="Screen1.jpg" alt="Screen1.jpg" src="http://i3.codeplex.com/Download?ProjectName=OpenDBiff&amp;amp;DownloadId=63045"&gt;&lt;/a&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/4797541933409185223/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=4797541933409185223&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4797541933409185223?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4797541933409185223?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/12/sql-server-schema-comparision-tool-open.html" title="Sql Server Schema Comparision tool: Open DBDiff" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUIFRX49cCp7ImA9WhNWEUw.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-8314374798237100185</id><published>2012-12-09T21:25:00.001-07:00</published><updated>2012-12-09T21:25:14.068-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-09T21:25:14.068-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JQuery" /><title>jqZoom–Javascript image zooming plugin</title><content type="html">&lt;p&gt;Came across this useful jQuery plugin called jqZoom that allows you to setup image zooming on your web-pages: &lt;a title="http://www.mind-projects.it/projects/jqzoom/" href="http://www.mind-projects.it/projects/jqzoom/"&gt;http://www.mind-projects.it/projects/jqzoom/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh4.ggpht.com/-keODauMwp9Y/UMVkKD7WsGI/AAAAAAAAPfk/Grb0TZ0L830/image%25255B8%25255D.png?imgmax=800" width="352" height="183"&gt;&lt;/p&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/8314374798237100185/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=8314374798237100185&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8314374798237100185?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8314374798237100185?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/12/jqzoomjavascript-image-zooming-plugin.html" title="jqZoom–Javascript image zooming plugin" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-keODauMwp9Y/UMVkKD7WsGI/AAAAAAAAPfk/Grb0TZ0L830/s72-c/image%25255B8%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CE8ARng4fip7ImA9WhNQFEU.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-4012241797170688312</id><published>2012-11-21T00:27:00.001-07:00</published><updated>2012-11-21T00:27:27.636-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-21T00:27:27.636-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Code Sample" /><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>Asp.Net MVC 4–Creating an AJAX page and using JQueryUI dialog</title><content type="html">&lt;p&gt;This is a very quick tutorial on how to create a page that displays data using AJAX. In addition, I will also show how to use the &lt;strong&gt;JQueryUI dialog&lt;/strong&gt; element.&lt;/p&gt; &lt;p&gt;First a quick description of the page we are going to build:&lt;/p&gt; &lt;p&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-C0UqC5TIDNg/UKyCW-fZv9I/AAAAAAAAPO4/2fN8H-i5Hq8/image%25255B5%25255D.png?imgmax=800" width="664" height="172"&gt;&lt;/p&gt; &lt;p&gt;There are 5 links on the page. When you click on one of the links 2 parts of the page are updated via jquery. (The div at the bottom and the dialog to the right).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 1: &lt;/strong&gt;Create a MVC 4 Internet application.&lt;br&gt;Create a new MVC 4 internet application project, which we will use for this tutorial.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 2: &lt;/strong&gt;Check to make sure “UnobtrusiveJavaScriptEnabled” is set to true in your web.config file.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 3: &lt;/strong&gt;Add the references to the unobtrusive scripts in _layout.cshtml:&lt;br&gt;This is done by adding the line: &lt;font face="Courier New"&gt;@Scripts.Render("~/bundles/jqueryval")&lt;/font&gt; right after the line: &lt;font face="Courier New"&gt;@Scripts.Render("~/bundles/jquery")&lt;br&gt;&lt;/font&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh4.ggpht.com/-4Wi8y4P5NnU/UKyCXTKKuPI/AAAAAAAAPPA/6J175U2B5hc/image%25255B10%25255D.png?imgmax=800" width="416" height="137"&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;strong&gt;FYI&lt;/strong&gt;: The reference to “~/bundles/jqueryval” is based on the bundle names defined in “BundleConfig.cs”.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "~/Scripts/jquery.unobtrusive*",&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "~/Scripts/jquery.validate*"));&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Add a new action to the HomeController, that will return a partial view:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public ActionResult IndexData(int id)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewBag.Id = id;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewBag.Title = "The ID is: " + id;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return PartialView();&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 4: &lt;/strong&gt;Create a view for the IndexData action:&lt;/p&gt; &lt;p&gt;Right click in the action and select “Add View” and select the defaults.&lt;/p&gt; &lt;p&gt;Add the following code to the new IndexData.cshtml page:&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;@{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;}&lt;br&gt;@Html.Hidden("Id",(int)ViewBag.Id)&lt;br&gt;@Html.TextBox("Title",(string)ViewBag.Title)&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt;Update &lt;strong&gt;Index.cshtml&lt;/strong&gt; to show the links and allow calls to occur using AJAX:&lt;/p&gt; &lt;p&gt;Add a reference to the CSS files used by JqueryUi by adding the following code:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;@Styles.Render("~/Content/themes/base/css")&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Add an Ajax.ActionLink:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;@Ajax.ActionLink&lt;/strong&gt;("ajax load for id: 101", "&lt;strong&gt;IndexData&lt;/strong&gt;", new {id = 101}, new &lt;strong&gt;AjaxOptions&lt;/strong&gt; {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The above line, adds a link with the text “ajax load for id: 101”. It will call the “IndexData” action on the HomeController and it will pass it the value of 101. Finally, check out the AjaxOptions values:&lt;br&gt;- The AJAX call will be performed as a GET operation&lt;br&gt;- The call will result in replacing the DOM with the data that is returned&lt;br&gt;- If the call succeeds, the “SuccessFunction” will be called.&lt;br&gt;- Finally the data that is returned by the ajax call will update a DOM element named “myDiv”&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;We will add a few more such links:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;@Ajax.ActionLink("ajax load for id: 202", "IndexData", new {id = 202}, new AjaxOptions {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;br&gt;&amp;lt;br/&amp;gt;&lt;br&gt;@Ajax.ActionLink("ajax load for id: 303", "IndexData", new {id = 303}, new AjaxOptions {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;br&gt;&amp;lt;br/&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The next step is to add a couple of divs that will be used to display the data.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;lt;div id="myDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;div id="myDiv2" style="border-width: medium; border-color: black"&amp;gt;&amp;lt;/div&amp;gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The first div will be used for the dialog and the 2nd div for updating a DOM element directly on the page.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Finally:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Add the following code to the end of the page:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;@section scripts&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Scripts.Render("~/bundles/jqueryui")&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(function() {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv").dialog({ autoOpen: false });&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function SuccessFunction(data) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv").dialog("open");&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv2").html(data);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Lets break down the code:&lt;/p&gt; &lt;p&gt;1. &lt;strong&gt;@Scripts.Render("~/bundles/jqueryui"):&lt;/strong&gt; This line adds the reference to the JqueryUI scripts&lt;/p&gt; &lt;p&gt;2. &lt;strong&gt;$(function() :&lt;/strong&gt; The ready-function, sets up myDiv to be a dialog. In addition, it sets it up to not open by default.&lt;/p&gt; &lt;p&gt;3. &lt;strong&gt;function SuccessFunction:&lt;/strong&gt; This is the function that is called when the Ajax calls return. It opens the dialog and also updates the 2nd div to show the same data in 2 different ways.&lt;/p&gt; &lt;p&gt;Final code for the index.cshtml&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="809" border="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="807"&gt; &lt;p&gt;&lt;font face="Courier New"&gt;@{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewBag.Title = "Home Page";&lt;br&gt;}&lt;br&gt;@Styles.Render("~/Content/themes/base/css")&lt;br&gt;@Ajax.ActionLink("ajax load for id: 101", "IndexData", new {id = 101}, new AjaxOptions {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;br&gt;&amp;lt;br/&amp;gt;&lt;br&gt;@Ajax.ActionLink("ajax load for id: 202", "IndexData", new {id = 202}, new AjaxOptions {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;br&gt;&amp;lt;br/&amp;gt;&lt;br&gt;@Ajax.ActionLink("ajax load for id: 303", "IndexData", new {id = 303}, new AjaxOptions {HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnSuccess = "SuccessFunction", UpdateTargetId = "myDiv"})&lt;br&gt;&amp;lt;br/&amp;gt;&lt;br&gt;&amp;lt;div id="myDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;&amp;lt;div id="myDiv2" style="border-width: medium; border-color: black"&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;@section scripts&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Scripts.Render("~/bundles/jqueryui")&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(function() {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv").dialog({ autoOpen: false });&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function SuccessFunction(data) {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv").dialog("open");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#myDiv2").html(data);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/4012241797170688312/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=4012241797170688312&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4012241797170688312?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4012241797170688312?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/aspnet-mvc-4creating-ajax-page-and.html" title="Asp.Net MVC 4–Creating an AJAX page and using JQueryUI dialog" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-C0UqC5TIDNg/UKyCW-fZv9I/AAAAAAAAPO4/2fN8H-i5Hq8/s72-c/image%25255B5%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEMASHw4eCp7ImA9WhNRGUQ.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-6834390711794699074</id><published>2012-11-15T09:20:00.001-07:00</published><updated>2012-11-15T09:20:49.230-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-15T09:20:49.230-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="MVC" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><title>ASP.Net MVC–Returning XML</title><content type="html">&lt;p&gt;If you need to return xml content from an MVC controller, the easiest way to do it is to use the “Controller.Content” method.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;font face="Courier New"&gt;public class TestController : Controller&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ActionResult Index()&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string result = “&amp;lt;books&amp;gt;&amp;lt;book/&amp;gt;&amp;lt;/books&amp;gt;”&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return this.Content(result, "text/xml");&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/6834390711794699074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=6834390711794699074&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6834390711794699074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/6834390711794699074?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/aspnet-mvcreturning-xml.html" title="ASP.Net MVC–Returning XML" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CU4NQHo4fCp7ImA9WhNRGUw.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-4642913721517362269</id><published>2012-11-14T10:23:00.001-07:00</published><updated>2012-11-14T10:26:31.434-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-14T10:26:31.434-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="WebApi" /><title>Asp.Net WebApi–allowing format to be specified in the URL</title><content type="html">&lt;p&gt;By default WebAPI looks at the header to determine how to serve back content. But what if you cant set the header in your client app and so you need to specify the format via the URL?&lt;/p&gt; &lt;p&gt;What you need to do is to add a query string mapping for the XML formatter. This can be done using the following code in “Application_Start” of the Global.aspx.cs file:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;MediaTypeFormatter xmlFormatter = GlobalConfiguration.Configuration.Formatters.XmlFormatter;&lt;br&gt;xmlFormatter.AddQueryStringMapping("format", "xml", "text/xml");&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;And what if you want XML to be your default formatter? The easy way I found for this was to reorder the formatters in “GlobalConfiguration.Configuration.Formatters”, so that the XML formatter was the first in the list.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;MediaTypeFormatter xmlFormatter = GlobalConfiguration.Configuration.Formatters.XmlFormatter;&lt;br&gt;MediaTypeFormatter jsonFormatter = GlobalConfiguration.Configuration.Formatters.JsonFormatter;&lt;br&gt;&lt;br&gt;GlobalConfiguration.Configuration.Formatters.Remove(xmlFormatter);&lt;br&gt;GlobalConfiguration.Configuration.Formatters.Remove(jsonFormatter);&lt;br&gt;GlobalConfiguration.Configuration.Formatters.Insert(0,jsonFormatter);&lt;br&gt;GlobalConfiguration.Configuration.Formatters.Insert(0, xmlFormatter);&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Note: If you reorder the formatters, you will need to add a query string mapper for JSON:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;jsonFormatter.AddQueryStringMapping("format", "json", "application/json");&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/4642913721517362269/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=4642913721517362269&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4642913721517362269?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/4642913721517362269?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/aspnet-webapiallowing-format-to-be.html" title="Asp.Net WebApi–allowing format to be specified in the URL" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUABRns5eSp7ImA9WhNRF0g.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-2711389074492332813</id><published>2012-11-12T15:02:00.001-07:00</published><updated>2012-11-12T15:02:37.521-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-12T15:02:37.521-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server" /><title>Calling webservices from SqlServer Reporting Services (SSRS)</title><content type="html">&lt;p&gt;There is surprisingly very little information on the web on how to call webservices from SSRS. So here is a quick list of stuff that I found out:&lt;/p&gt; &lt;p&gt;Note: I am using WCF webservices for what I was doing (shouldn’t matter if you are using some other kind of service, as long as it’s a SOAP service).&lt;/p&gt; &lt;p&gt;Note 2: Use something like Fiddler to inspect the traffic to figure out what the request is going out as. It can be useful to figure out why a call is erroring out.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Create a new data-source.&lt;/li&gt; &lt;ol&gt; &lt;li&gt;Choose “Use a connection embedded in my report”&lt;/li&gt; &lt;li&gt;Set the “connection type” as xml&lt;/li&gt; &lt;li&gt;Enter the url to the webservice (eg: &lt;a href="http://myserver/ssrsTest.svc"&gt;http://myserver/ssrsTest.svc&lt;/a&gt;)&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Right click on the data-source and select add “DataSet”&lt;/li&gt; &lt;ol&gt; &lt;li&gt;Select “Use a dataset embedded in my report”&lt;/li&gt; &lt;li&gt;Open the query designer and build your query in there.&lt;/li&gt;&lt;/ol&gt; &lt;li&gt;Here is what a query looks like to call a method named &lt;strong&gt;test&lt;/strong&gt; that takes no parameters:&lt;/li&gt; &lt;ol&gt; &lt;p&gt;&amp;lt;Query&amp;gt;&lt;br&gt;&amp;lt;Method Name="test" Namespace="&lt;a href="http://tempuri.org/&amp;quot;"&gt;&lt;font style="background-color: #ffff00"&gt;http://tempuri.org/&lt;/font&gt;"&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;lt;/Method&amp;gt;&lt;br&gt;&amp;lt;SoapAction&amp;gt;&lt;a href="http://tempuri.org/ITestService/Test"&gt;http://tempuri.org/ITestService/Test&lt;/a&gt;&amp;lt;/SoapAction&amp;gt;&lt;br&gt;&amp;lt;/Query&amp;gt;&lt;/p&gt; &lt;p&gt;The &lt;strong&gt;namespaces&lt;/strong&gt; were found by looking at the WSDL (target namespace defines the namespace)&lt;/p&gt; &lt;p&gt;&amp;lt;wsdl:operation name="Test"&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:operation soapAction="&lt;a href="http://tempuri.org/IReportingService/Test&amp;quot;"&gt;&lt;font style="background-color: #ffff00"&gt;http://tempuri.org/ITestService/Test"&lt;/font&gt;&lt;/a&gt; style="document"/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsdl:input&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:body use="literal"/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/wsdl:input&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;wsdl:output&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:body use="literal"/&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/wsdl:output&amp;gt;&lt;br&gt;&amp;lt;/wsdl:operation&amp;gt;&lt;/p&gt;&lt;/ol&gt; &lt;li&gt;Here is what a query looks like to call a method named &lt;strong&gt;testWithParameters&lt;/strong&gt; that takes one parameter&lt;/li&gt; &lt;p&gt;&amp;lt;Query&amp;gt;&lt;br&gt;&amp;lt;Method Name="&lt;strong&gt;testWithParameters&lt;/strong&gt; " Namespace="&lt;a href="http://tempuri.org/&amp;quot;"&gt;http://tempuri.org/"&lt;/a&gt;&amp;gt;&lt;br&gt;&amp;lt;Parameters&amp;gt;&lt;br&gt;&amp;lt;Parameter Name="&lt;strong&gt;testParameter&lt;/strong&gt;"&amp;gt;&amp;lt;DefaultValue&amp;gt;1&amp;lt;/DefaultValue&amp;gt;&amp;lt;/Parameter&amp;gt;&lt;br&gt;&amp;lt;/Parameters&amp;gt;&lt;br&gt;&amp;lt;/Method&amp;gt;&lt;br&gt;&amp;lt;SoapAction&amp;gt;http://tempuri.org/ITestService/&lt;strong&gt;testWithParameters&lt;/strong&gt;&amp;lt;/SoapAction&amp;gt;&lt;br&gt;&amp;lt;/Query&amp;gt;&lt;/p&gt;&lt;/ol&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/2711389074492332813/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=2711389074492332813&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/2711389074492332813?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/2711389074492332813?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/calling-webservices-from-sqlserver.html" title="Calling webservices from SqlServer Reporting Services (SSRS)" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUARX0zeyp7ImA9WhNRFk0.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-7308447107185799611</id><published>2012-11-10T20:07:00.001-07:00</published><updated>2012-11-10T20:07:24.383-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-10T20:07:24.383-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WinRT" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows Store" /><title>How to sideload Windows 8 store apps onto a development device</title><content type="html">&lt;p&gt;Here are the steps that one must go through to sideload a Windows 8 store app on to a development device for testing (the dev device is a device other than the one on which it was developed – as on the development machine, Visual Studio takes care of loading the app).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Build the app package&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Under Project &amp;gt; Store, select “Create App Packages”&lt;br&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-itMTEBfMuQg/UJ8WXsnbYOI/AAAAAAAAPMM/SRehpI2ZO0A/image%25255B4%25255D.png?imgmax=800" width="475" height="400"&gt;&lt;/li&gt; &lt;li&gt;Select No on the first page of the dialog (Do you want to build packages to upload to the Windows Store?)&lt;br&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-HIQw86d1VX0/UJ8WYtrcmYI/AAAAAAAAPMU/s4gqtkyYzLc/image%25255B15%25255D.png?imgmax=800" width="357" height="160"&gt;&lt;/li&gt; &lt;li&gt;Make sure you select an architecture that’s appropriate for the machine where you will be testing the package.&lt;br&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-n9Bvw_zqJ74/UJ8WZL49wNI/AAAAAAAAPMc/cOI2PcoG8pY/image%25255B16%25255D.png?imgmax=800" width="244" height="224"&gt;&lt;/li&gt; &lt;li&gt;The next step will create the app package.&lt;/li&gt; &lt;li&gt;Open the folder where the app package was created, you should find a file with the extension “appxupload”. If you look in the folder, you will also find a file named “Add-AppDevPackage.ps1”&lt;/li&gt; &lt;li&gt;Copy the folder and its contents to the target machine.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;strong&gt;Prep the target machine to be able to sideload the a&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Note: this preps the target machine as a dev machine. What this means is that your app will run for only 3 months and then expire and you will have to reacquire the dev license.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Run powershell as an administrator on the target machine (the easiest way to do this is to hit Windows key + Q and search for powershell. Tap and drag the powershell icon and you will see the context menu from where you can open it in admin mode).&lt;br&gt;&lt;img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-ZlGTx4iyE4s/UJ8Wam7J0jI/AAAAAAAAPMk/zL4OJ5uuDGs/image%25255B21%25255D.png?imgmax=800" width="316" height="251"&gt;&lt;/li&gt; &lt;li&gt;Setup powershell to run in unrestricted mode by typing “set-executionpolicy unrestriced” and hitting enter. (note: you need to do this only one time per machine).&lt;/li&gt; &lt;li&gt;Acquire a developer license by typing “&lt;em&gt;Show-WindowsDeveloperLicenseRegistration” &lt;/em&gt;at the command prompt and following the steps in the dialog (you will have to sign in to your Windows Live account).&lt;/li&gt; &lt;li&gt;To install the application, find the “add-appdevpackage.ps1” file that we found in step 5 above. Run it by typing “&lt;em&gt;Add-AppDevPackage.ps1” &lt;/em&gt;and hitting enter.&lt;/li&gt; &lt;li&gt;The application will be installed on the target machine and you will be able to run it from the dashboard.&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/7308447107185799611/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=7308447107185799611&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7308447107185799611?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/7308447107185799611?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/how-to-sideload-windows-8-store-apps.html" title="How to sideload Windows 8 store apps onto a development device" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-itMTEBfMuQg/UJ8WXsnbYOI/AAAAAAAAPMM/SRehpI2ZO0A/s72-c/image%25255B4%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DE4GQXY_cSp7ImA9WhNREU4.&quot;"><id>tag:blogger.com,1999:blog-7656888.post-8244200914918831084</id><published>2012-11-05T10:35:00.001-07:00</published><updated>2012-11-05T10:35:20.849-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-11-05T10:35:20.849-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CRM 2011" /><title>CRM 2011 - Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed</title><content type="html">&lt;p&gt;I got the following error when I was installing CRM 2011 on one of our servers that had CRM 4 installed previously on it:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed.&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;Windows NT user or group 'Domain\SQLAccessGroup {GUID}' not found. Check the name again.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I was able to fix the error by deleting the following logins on the SqlServer being used by CRM:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;DomainName\PrivReportingGroup {GUID VALUE}&lt;br&gt;DomainName\ReportingGroup {GUID VALUE}&lt;br&gt;DomainName\SQLAccessGroup {GUID VALUE}&lt;/p&gt;&lt;/blockquote&gt;  </content><link rel="replies" type="application/atom+xml" href="http://blog.aggregatedintelligence.com/feeds/8244200914918831084/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=7656888&amp;postID=8244200914918831084&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8244200914918831084?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/7656888/posts/default/8244200914918831084?v=2" /><link rel="alternate" type="text/html" href="http://blog.aggregatedintelligence.com/2012/11/crm-2011-action-microsoftcrmsetupserver.html" title="CRM 2011 - Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed" /><author><name>Raj Rao</name><uri>https://plus.google.com/105969740227516948072</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-tDfz18sw7k8/AAAAAAAAAAI/AAAAAAAAAAA/lfehvy89gFY/s512-c/photo.jpg" /></author><thr:total>0</thr:total></entry></feed>
