<?xml version="1.0" ?>
<?xml-stylesheet href="/css/rss20.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:pheedo="http://www.pheedo.com/namespace/pheedo">
	<channel>
		<title>DotNetSlackers Latest ASP.NET News in Category ASP.NET</title>
		<link>http://www.dotnetslackers.com/ASP.NET/re-default.aspx</link>
		<description>Latest ASP.NET news from DotNetSlackers in Category ASP.NET</description>
		<ttl>60</ttl>
		<item>
			<title>Using Microsoft`s Chart Controls In An ASP.NET Application: Serializing Chart Data</title>
			<link>http://www.pheedcontent.com/click.phdo?i=2281ca5a42ac0085002a1a4cbcdcc5d3</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291102_Using_Microsoft_s_Chart_Controls_In_An_ASP_NET_Application_Serializing_Chart_Data.aspx</pheedo:origLink>
			<description>&lt;p&gt;In most usage scenarios, the data displayed in a Microsoft Chart control comes from some dynamic source, such as from a database query. The appearance of thechart can be modified dynamically, as well; past installments in this article series showed how to programmatically customize the axes, labels, and other appearance-related settings. However, it is possible to statically define the chart's data and appearance strictly through the control's declarative markup. One of the demos examined inthe &lt;a rel='nofollow' href="http://www.4guysfromrolla.com/articles/072209-1.aspx"&gt;Getting Started&lt;/a&gt; article rendered a column chart with seven columns whose labels and values weredefined statically in the &lt;code&gt;&amp;lt;asp:Series&amp;gt;&lt;/code&gt; tag's &lt;code&gt;&amp;lt;Points&amp;gt;&lt;/code&gt; collection.&lt;/p&gt;&lt;p&gt;Given this functionality, it should come as no surprise that the Microsoft Chart Controls also support &lt;i&gt;serialization&lt;/i&gt;. Serialization is the process of persisting thestate of a control or an object to some other medium, such as to disk. &lt;i&gt;Deserialization&lt;/i&gt; is the inverse process, and involves taking the persisted data and recreating the control or object. With just a few lines of code you can persist the appearance settings, the data, or both to a file on disk or to any stream. Likewise, it takes just a fewlines of codes to reconstitute a chart from the persisted information.&lt;/p&gt;&lt;p&gt;This article shows how to use the Microsoft Chart Control's serialization functionality by examining a demo application that allows users to create custom charts, specifyingthe data to plot and some appearance-related settings. The user can then save a "snapshot" of this chart, which persists its appearance and data to a record in a database.From another page, users can view these saved chart snapshots. Read on to learn more!&lt;br /&gt;&lt;a rel='nofollow' href="http://www.4guysfromrolla.com/articles/021010-1.aspx" class="readmore"&gt;Read More &amp;gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=2281ca5a42ac0085002a1a4cbcdcc5d3&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=2281ca5a42ac0085002a1a4cbcdcc5d3&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>4GuysFromRolla.com Headlines</author>
			<pubDate>Wed, 10 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Using Microsoft`s Chart Controls In An ASP.NET Application: Serializing Chart Data</title>
			<link>http://www.pheedcontent.com/click.phdo?i=2281ca5a42ac0085002a1a4cbcdcc5d3</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291102_Using_Microsoft_s_Chart_Controls_In_An_ASP_NET_Application_Serializing_Chart_Data.aspx</pheedo:origLink>
			<description>In most usage scenarios, the data displayed in a Microsoft Chart control comes from some dynamic source, such as from a database query. The appearance of thechart can be modified dynamically, as well; past installments in this article series showed how to programmatically customize the axes, labels, and other appearance-related settings. However, it is possible to statically define the chart's data and appearance strictly through the control's declarative markup. One of the demos examined inthe...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=2281ca5a42ac0085002a1a4cbcdcc5d3&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=2281ca5a42ac0085002a1a4cbcdcc5d3&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>4GuysFromRolla.com Headlines</author>
			<pubDate>Wed, 10 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>ASP.NET 4.0 and the Entity Framework 4 - Part 1 - Create a Database using Model-First Development</title>
			<link>http://www.pheedcontent.com/click.phdo?i=4e8531c53feb95ed1c9acf3c6563aa97</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291088_ASP_NET_4_0_and_the_Entity_Framework_4_Part_1_Create_a_Database_using_Model_First_Development.aspx</pheedo:origLink>
			<description>This is the first in a series of articles that will develop an ASP.NET application that uses the Entity Framework 4.  This article will demonstrate how to use Visual Studio 2010 and the Entity Framework 4 to create a database in a step-by-step approach. The database created in this article will then be used in future articles to demonstrate how to add, update, delete, and select records using the Entity Framework.&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=4e8531c53feb95ed1c9acf3c6563aa97&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=4e8531c53feb95ed1c9acf3c6563aa97&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>ASPAlliance.com - The #1 ASP.NET Community</author>
			<pubDate>Tue, 09 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Code Magazine article on ASP.NET MVC 2 source code download</title>
			<link>http://www.pheedcontent.com/click.phdo?i=d3d01c7d33281a0f93274c03fe9dcf91</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291082_Code_Magazine_article_on_ASP_NET_MVC_2_source_code_download.aspx</pheedo:origLink>
			<description>In the Nov/Dec 2009 issue of CODE Magazine, I submitted an article entitle ASP.NET MVC 2 in Action.&amp;#160; You can read the full article online here.&amp;#160; I wanted to write this short post to let the public know where to get the source code used for the article.&amp;#160; You can download the code here. ...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=d3d01c7d33281a0f93274c03fe9dcf91&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=d3d01c7d33281a0f93274c03fe9dcf91&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>Jeffrey Palermo</author>
			<pubDate>Tue, 09 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>New Filtering Menu for RadGrid for ASP.NET AJAX</title>
			<link>http://www.pheedcontent.com/click.phdo?i=6448fb0efc94199e912ef49195bba2f9</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291066_New_Filtering_Menu_for_RadGrid_for_ASP_NET_AJAX.aspx</pheedo:origLink>
			<description>&lt;p&gt;Hi everyone,&lt;/p&gt; &lt;p&gt;As of Q1 2010 RadGrid will be equipped with a new filtering menu  a powerful and flexible feature the interest in which was sparked by RadGrids MVC counterpart offered by Telerik. It will be a sub-part of RadGrid's header context menu and will allow for filtering the grid's data on two conditions related with a logical AND operator:&lt;/p&gt; &lt;p&gt;&lt;a rel='nofollow' href="http://blogs.telerik.com/Libraries/MetaBlogLib/Filter_4E5CCD7E.sflb"&gt;&lt;img width="710" height="395" width="710" height="395" title="Filter" style="border: 0px solid; display: inline;" alt="Filter" src="http://blogs.telerik.com/Libraries/MetaBlogLib/Filter_thumb_2F926B6E.sflb" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Perhaps, many of you are already eager to know how the new feature should be switched on/off. For this purpose a new property has been introduced into the RadGrid control -&lt;strong&gt;RadGrid.EnableHeaderContextFilterMenu/&lt;/strong&gt;&lt;strong&gt;GridTableView.EnableHeaderContextFilterMenu&lt;/strong&gt;. In addition, it is important that &lt;strong&gt;RadGrid.EnableHeaderContextMenu/&lt;/strong&gt; &lt;strong&gt;GridTableView.EnableHeaderContextMenu &lt;/strong&gt;and &lt;strong&gt;RadGrid.AllowFilteringByColumn/GridTableView.AllowFilteringByColumn&lt;/strong&gt; properties be set to true in order for the header context filter menu to be available. &lt;/p&gt; &lt;p&gt;For the purpose of supporting this extension to RadGrid's filtering mechanism, each &lt;strong&gt;GridColumn&lt;/strong&gt; will feature an additional current filter function/value properties that are set to contain the second filter condition data. These properties are called &lt;strong&gt;AndCurrentFilterFunction&lt;/strong&gt;/&lt;strong&gt;AndCurrentFilterValue&lt;/strong&gt;: &lt;/p&gt; &amp;lt;&lt;/span&gt;telerik:GridBoundColumn&lt;/span&gt;  CurrentFilterFunction&lt;/span&gt;="GreaterThan" &lt;/span&gt;CurrentFilterValue&lt;/span&gt;="2.5"&lt;/span&gt;  AndCurrentFilterFunction&lt;/span&gt;="LessThan"&lt;/span&gt; AndCurrentFilterValue&lt;/span&gt;="5.0" &lt;/span&gt;&lt;/span&gt;  DataField&lt;/span&gt;="Freight" &lt;/span&gt;DataType&lt;/span&gt;="System.Decimal"&lt;/span&gt; HeaderText&lt;/span&gt;="Freight"&lt;/span&gt;  &lt;/span&gt;SortExpression&lt;/span&gt;="Freight"&lt;/span&gt; UniqueName&lt;/span&gt;="Freight"&amp;gt;&lt;/span&gt; &lt;br /&gt; &lt;/span&gt;&amp;lt;/&lt;/span&gt;telerik:GridBoundColumn&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;In spite of having been created to allow for filtering the grid on two conditions, the new menu will give the freedom to set only one of those. The condition for which no data has been set will be ignored and RadGrid will filter its data only on the one for which a filter function and a filter value have been set. &lt;/p&gt; &lt;p&gt;When a filter command is triggered from the header context filter menu, RadGrid will construct a command argument object represented by a Triplet: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;the first object will contain the column's unique name on which the filter command has been fired. &lt;/li&gt; &lt;li&gt;the second will be a Pair object including the first filter condition filter function and filter value. &lt;/li&gt; &lt;li&gt;the third one will also constitute a Pair object containing the second filter condition filter function and filter value. &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;After the ItemCommand event of the grid is raised, the command argument object constructed as described above will be sent into the event handlers attached to the event. The name of the new filter command is &lt;strong&gt;HeaderContextFilterMenuCommand&lt;/strong&gt;. &lt;/p&gt; &lt;p&gt;The header context filter menu will consist of:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;a "ClearFilter" button that resets the filtering on the given column &lt;/li&gt; &lt;li&gt;two RadComboBox controls containing the filter function options &lt;/li&gt; &lt;li&gt;two RadTextBox's or another type of special controls for setting the filter values. &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;and will be represented by a single object server-side. This way of implementation has been chosen to speed up the grid performance by merely creating one menu instance server side and then, based on the type of the column over which it is displayed, show the required filter functions and filter value controls. The presence in the grid of special columns such as GridDateTimeColumn, GridMaskedColumn etc. will make the header context filter menu create corresponding controls for extra convenience in specifying the filter values (such as RadDatePicker, RadMaskedBox, etc.). For greater optimization only two instances of each specific type of control are created server-side and then used for all columns that require them. Therefore, if the grid has five numeric columns only two instances of a RadNumericBox control will be created and then used by all numeric columns. Still the filtering menu remains independent for each column - this means that the filtering menu options vary by the column's DataType and the properties of the special controls will depend on any other specific column properties such as Mask, DecimalDigits, PickerType etc. &lt;/p&gt; &lt;p&gt;The new filter menu can be used along-side the classic one. In this case, the GridTableView.IsFilterItemExpanded property should be set to &lt;strong&gt;true&lt;/strong&gt; (the default value). When the two filter menus are switched on simultaneously, the data set for the first filter condition of the header context filter menu will be also set as filter data for the classic one and vice versa. Thus, if you choose the EqualTo filter option from the first combo in the header context filter menu and specify "Bulgaria" as a filter value, then the filter function of the classic menu on the same column will automatically be set to EqualTo and the filter box will be populated with "Bulgaria" as a filter value. If you want to use just the header context filter menu, then just set GridTableView.IsFilterItemExpanded property to &lt;strong&gt;false&lt;/strong&gt; leaving, as mentioned above, the RadGrid.GridTableView/GridTableView.AllowFilteringByColumn property to &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;There is no other more valuable feature, a grid control may possess, than its filtering capabilities. Improving those means placing more and more power at the hands of developers and end-users. And thats exactly what we have tried to deliver with the introduction of RadGrids header context filter menu. So, stand by the Q1 release is just around the corner.&lt;/p&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=6448fb0efc94199e912ef49195bba2f9&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=6448fb0efc94199e912ef49195bba2f9&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>the telerik blogs</author>
			<pubDate>Mon, 08 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Create Matrix Report using ReportViewer in ASP.NET 2.0</title>
			<link>http://www.pheedcontent.com/click.phdo?i=21b1efac8f2a0db1fa9a7af1cc53a262</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291051_Create_Matrix_Report_using_ReportViewer_in_ASP_NET_2_0.aspx</pheedo:origLink>
			<description>This article creates matrix reports with ObjectDataSource using ReportViewer in ASP.NET 2.0....&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=21b1efac8f2a0db1fa9a7af1cc53a262&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=21b1efac8f2a0db1fa9a7af1cc53a262&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>The Code Project Latest Articles</author>
			<pubDate>Sun, 07 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>ASP.NET MVC Quick Tips by Nuno Silva(MSFT)</title>
			<link>http://www.pheedcontent.com/click.phdo?i=23229a123ce5007d68dc089ffc8628a3</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291032_ASP_NET_MVC_Quick_Tips_by_Nuno_Silva_MSFT.aspx</pheedo:origLink>
			<description>Recently I find a blog (by Nuno Silva(MSFT))&amp;nbsp; which ansewrs many of questions about ASP.NET MVC so you may check it out:http://blogs.msdn.com/nunos/archive/tags/MVC/default.aspxSome recent posts are :ASP.NET MVC Quick Tips  What should my Model be?ASP.NET MVC Quick Tips  How do I pass data to a view?ASP.NET MVC Quick Tips  Pass data to your master pageASP.NET MVC Quick Tips  Can I change the templates?...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=23229a123ce5007d68dc089ffc8628a3&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=23229a123ce5007d68dc089ffc8628a3&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>ASP.NET Announcements</author>
			<pubDate>Fri, 05 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Json in .NET</title>
			<link>http://www.pheedcontent.com/click.phdo?i=0d0ce2e9fd329b77bc7059594fddff2d</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291028_Json_in_NET.aspx</pheedo:origLink>
			<description>&lt;p&gt;I use Json all the time, but I feel like its super annoying in .NET.&amp;#160; Typically Id call some web service that returns Json. In .NET it seems like the best thing to is to define a data contract and use the DataContractSerializer:&lt;/p&gt;  &lt;pre class="csharpcode"&gt;[DataContract]public&lt;/span&gt; class&lt;/span&gt; Person{    [DataMember]    public&lt;/span&gt; string&lt;/span&gt; FirstName { get; set; }    [DataMember]    public&lt;/span&gt; string&lt;/span&gt; LastName { get; set; }}&lt;/pre&gt;&lt;p&gt;then to deserialize whatever string of Json I got back..csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/p&gt;&lt;pre class="csharpcode"&gt;public&lt;/span&gt; static&lt;/span&gt; Person DeserializeToPerson( string&lt;/span&gt; jsonString ){   using&lt;/span&gt;( MemoryStream ms = new&lt;/span&gt; MemoryStream( Encoding.Unicode.GetBytes( jsonString ) ) )   {      DataContractJsonSerializer serializer =         new&lt;/span&gt; DataContractJsonSerializer( typeof&lt;/span&gt;( Person ) );      return&lt;/span&gt; ( Person )serializer.ReadObject( ms );    }}&lt;/pre&gt;&lt;p&gt;Feels like a lot of code and I need to define the data contract beforehand which seems a little unnecessary given the dynamic nature of web services and Json. Things like the the memory stream reader and getting bytes off the string are brutal. Why cant i just pass a string to the JsonDataContractSerializer? Some things seem way more complicated in .NET than they need to be. (cref: Calling REST services in .NET)&lt;/p&gt;&lt;p&gt;What Id like is something closer to Python.&lt;/p&gt;&lt;pre class="csharpcode"&gt;import simplejson as&lt;/span&gt; jsonperson = json.loads(jsonString)print person.FirstName&lt;/pre&gt;&lt;p&gt;That is pretty easy. &lt;/p&gt;&lt;p&gt;With .NET there are some options like:&lt;/p&gt;&lt;p&gt;System.Json&lt;/p&gt;&lt;pre class="csharpcode"&gt;var data = JsonObject.Load(dataStream);  Console.Writeline(data[&amp;quot;FirstName&amp;quot;&lt;/span&gt;])&lt;/pre&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;p&gt;This is pretty close to what I want. The problem is having to cast sub items to things like JsonArray and what not. Secondly, System.Json only works in Silverlight so i cant use in a web project or desktop app.&lt;/p&gt;&lt;p&gt;Next option is one of the Json libraries like Json.Net. Not that I mind using any 3rd party DLLs, I just think parsing Json is fairly common if you are calling a rest web service and it should be in the framework, maybe Im the only one that uses json all the time instead of XML but Id rather use Lotus Notes everyday than parse XML and you know I hates the Lotus Notes.&lt;/p&gt;&lt;p&gt;This site has an interesting approach: &lt;a rel='nofollow' href="http://blog.petegoo.com/archive/2009/10/27/using-json.net-to-eval-json-into-a-dynamic-variable-in.aspx"&gt;http://blog.petegoo.com/archive/2009/10/27/using-json.net-to-eval-json-into-a-dynamic-variable-in.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2 problems for me. I still need to reference Json.Net and there is that ridiculous looking code to convert to Expando object. I just dont feel comfortable dropping that blob in my code.&lt;/p&gt;&lt;p&gt;Ideally Json parsing would be something similar but handled in the framework:&lt;/p&gt;&lt;pre class="csharpcode"&gt;dynamic person = JsonObject.Load(jsonString)Console.Writeline(person.FirstName)&lt;/pre&gt;&lt;p&gt;That makes me happy. No pre-defining a contract and something in the framework that can take a string of Json and return back a dynamic object. There is so much stuff in the .NET framework, why cant there be useful helpers that do common tasks like this.&lt;/p&gt;&lt;p&gt;I could totally be missing simpler solutions so feel free to chime in if Im just an idiot and missing something obvious.&lt;/p&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=108535" width="1" height="1"&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=0d0ce2e9fd329b77bc7059594fddff2d&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=0d0ce2e9fd329b77bc7059594fddff2d&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>Clarity Blogs: ASP.NET</author>
			<pubDate>Fri, 05 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>ASP.NET MVC 2 (Release Candidate 2) Now Available</title>
			<link>http://www.pheedcontent.com/click.phdo?i=d88dadcb201a47a1fdee7e613b9bc2a7</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291017_ASP_NET_MVC_2_Release_Candidate_2_Now_Available.aspx</pheedo:origLink>
			<description>[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu]    Earlier this evening the ASP.NET team shipped ASP.NET MVC (Release Candidate 2) for VS 2008/.NET 3.5.&amp;#160; You can download it here.    The RC2 release of ASP.NET MVC 2 is a follow-up to the first ASP.NET MVC 2 RC build that we shipped in December.&amp;#160; It includes a bunch of bug fixes, performance work, and some final API and behavior additions/changes.&amp;#160; Below...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=d88dadcb201a47a1fdee7e613b9bc2a7&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=d88dadcb201a47a1fdee7e613b9bc2a7&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>ScottGus Blog</author>
			<pubDate>Fri, 05 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>ASP.NET MVC 2 RC 2 Released</title>
			<link>http://www.pheedcontent.com/click.phdo?i=4614d02fe6a539a469affd43ab5b7fd5</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-291011_ASP_NET_MVC_2_RC_2_Released.aspx</pheedo:origLink>
			<description>Today Im pleased to announce the availability of Release Candidate 2 for ASP.NET MVC 2.  After receiving feedback from our last release candidate back in December, we decided it would be prudent to have one more release candidate that incorporated the feedback. You can read the release notes for everything that changed, theres not a whole lot.  The biggest change in this release was described by Brad Wilson in his blog post on Input Validation vs. Model Validation in ASP.NET MVC. Also included in...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=4614d02fe6a539a469affd43ab5b7fd5&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=4614d02fe6a539a469affd43ab5b7fd5&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>youve been HAACKED</author>
			<pubDate>Fri, 05 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Experimenting with inter-role communication on Azure for caching</title>
			<link>http://www.pheedcontent.com/click.phdo?i=53bbbb1d84a311b42c618630c560618a</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290991_Experimenting_with_inter_role_communication_on_Azure_for_caching.aspx</pheedo:origLink>
			<description>&lt;p&gt;Its been awhile since Ive used Azure. The new storage libraries are a welcome addition. As a better diagnostic framework and inter-role communication. In a previous Azure project, I wanted to use ASP.NET caching on the web role, but that breaks down if you start to run multiple instances. With inter-role communication it seems like you could use caching on the server as long as you notify the other instances of updates to the cache. I wrote a little prototype to do that. Its fairly basic and I havent tested it on a real deployment or benchmarked etc. Basically this may just be a terrible way of doing things.&lt;/p&gt;  &lt;p&gt;First I defined a contract for the cache messages:&lt;/p&gt;     &lt;pre&gt;   1:  &lt;/span&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;  &lt;pre&gt;   2:  &lt;/span&gt;using&lt;/span&gt; System.ServiceModel;&lt;/pre&gt;  &lt;pre&gt;   3:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;   4:  &lt;/span&gt;namespace&lt;/span&gt; MvcWebRole1.Caching&lt;/pre&gt;  &lt;pre&gt;   5:  &lt;/span&gt;{&lt;/pre&gt;  &lt;pre&gt;   6:  &lt;/span&gt;    /// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;   7:  &lt;/span&gt;    /// Defines the contract for the cache service.&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;   8:  &lt;/span&gt;    /// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;   9:  &lt;/span&gt;    [ServiceContract]&lt;/pre&gt;  &lt;pre&gt;  10:  &lt;/span&gt;    public&lt;/span&gt; interface&lt;/span&gt; ICacheService&lt;/pre&gt;  &lt;pre&gt;  11:  &lt;/span&gt;    {&lt;/pre&gt;  &lt;pre&gt;  12:  &lt;/span&gt;        [OperationContract(IsOneWay = true&lt;/span&gt;)]&lt;/pre&gt;  &lt;pre&gt;  13:  &lt;/span&gt;        void&lt;/span&gt; Insert(string&lt;/span&gt; key, object&lt;/span&gt; value&lt;/span&gt;);&lt;/pre&gt;  &lt;pre&gt;  14:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  15:  &lt;/span&gt;        [OperationContract(IsOneWay = true&lt;/span&gt;)]&lt;/pre&gt;  &lt;pre&gt;  16:  &lt;/span&gt;        void&lt;/span&gt; Remove(string&lt;/span&gt; key);&lt;/pre&gt;  &lt;pre&gt;  17:  &lt;/span&gt;    }&lt;/pre&gt;  &lt;pre&gt;  18:  &lt;/span&gt;}&lt;/pre&gt;&lt;p&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/p&gt;&lt;p&gt;Next I implemented the service for that contract. &lt;/p&gt;  &lt;pre&gt;   1:  &lt;/span&gt;using&lt;/span&gt; System;&lt;/pre&gt;  &lt;pre&gt;   2:  &lt;/span&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;  &lt;pre&gt;   3:  &lt;/span&gt;using&lt;/span&gt; System.Diagnostics;&lt;/pre&gt;  &lt;pre&gt;   4:  &lt;/span&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;  &lt;pre&gt;   5:  &lt;/span&gt;using&lt;/span&gt; System.ServiceModel;&lt;/pre&gt;  &lt;pre&gt;   6:  &lt;/span&gt;using&lt;/span&gt; System.Threading;&lt;/pre&gt;  &lt;pre&gt;   7:  &lt;/span&gt;using&lt;/span&gt; Microsoft.WindowsAzure.Diagnostics;&lt;/pre&gt;  &lt;pre&gt;   8:  &lt;/span&gt;using&lt;/span&gt; Microsoft.WindowsAzure.ServiceRuntime;&lt;/pre&gt;  &lt;pre&gt;   9:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  10:  &lt;/span&gt;namespace&lt;/span&gt; MvcWebRole1.Caching&lt;/pre&gt;  &lt;pre&gt;  11:  &lt;/span&gt;{&lt;/pre&gt;  &lt;pre&gt;  12:  &lt;/span&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  13:  &lt;/span&gt;    /// Implementation of the WCF cache service.&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  14:  &lt;/span&gt;    /// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  15:  &lt;/span&gt;    [ServiceBehavior(&lt;/pre&gt;  &lt;pre&gt;  16:  &lt;/span&gt;        InstanceContextMode = InstanceContextMode.Single,&lt;/pre&gt;  &lt;pre&gt;  17:  &lt;/span&gt;        ConcurrencyMode = ConcurrencyMode.Multiple,&lt;/pre&gt;  &lt;pre&gt;  18:  &lt;/span&gt;#if&lt;/span&gt; DEBUG&lt;/pre&gt;  &lt;pre&gt;  19:  &lt;/span&gt;        IncludeExceptionDetailInFaults = true&lt;/span&gt;,&lt;/pre&gt;  &lt;pre&gt;  20:  &lt;/span&gt;#else&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  21:  &lt;/span&gt;        IncludeExceptionDetailInFaults = false&lt;/span&gt;,&lt;/pre&gt;  &lt;pre&gt;  22:  &lt;/span&gt;#endif&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  23:  &lt;/span&gt; AddressFilterMode = AddressFilterMode.Any)]&lt;/pre&gt;  &lt;pre&gt;  24:  &lt;/span&gt;    public&lt;/span&gt; class&lt;/span&gt; CacheService : ICacheService&lt;/pre&gt;  &lt;pre&gt;  25:  &lt;/span&gt;    {&lt;/pre&gt;  &lt;pre&gt;  26:  &lt;/span&gt;        public&lt;/span&gt; void&lt;/span&gt; Insert(string&lt;/span&gt; key, object&lt;/span&gt; value&lt;/span&gt;)&lt;/pre&gt;  &lt;pre&gt;  27:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  28:  &lt;/span&gt;            HttpRuntime.Cache.Insert(key, value&lt;/span&gt;);&lt;/pre&gt;  &lt;pre&gt;  29:  &lt;/span&gt;            Trace.TraceInformation(String.Format(&amp;quot;Added: {0} to key: {1} from broadcast&amp;quot;&lt;/span&gt;, value&lt;/span&gt;, key));&lt;/pre&gt;  &lt;pre&gt;  30:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  31:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  32:  &lt;/span&gt;        public&lt;/span&gt; void&lt;/span&gt; Remove(string&lt;/span&gt; key)&lt;/pre&gt;  &lt;pre&gt;  33:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  34:  &lt;/span&gt;            HttpRuntime.Cache.Remove(key);&lt;/pre&gt;  &lt;pre&gt;  35:  &lt;/span&gt;            Trace.TraceInformation(String.Format(&amp;quot;Removed key: {0} from broadcast&amp;quot;&lt;/span&gt;, key));&lt;/pre&gt;  &lt;pre&gt;  36:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  37:  &lt;/span&gt;    }&lt;/pre&gt;  &lt;pre&gt;  38:  &lt;/span&gt;}&lt;/pre&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;p&gt;That handles the inserts / deletes the cached items when one instance broadcasts a cache update.&lt;/p&gt;&lt;p&gt;The next bit of code is used to cache on one instance and then broadcast that info out to the other roles.&lt;/p&gt;  &lt;pre&gt;   1:  &lt;/span&gt;using&lt;/span&gt; System;&lt;/pre&gt;  &lt;pre&gt;   2:  &lt;/span&gt;using&lt;/span&gt; System.Diagnostics;&lt;/pre&gt;  &lt;pre&gt;   3:  &lt;/span&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;  &lt;pre&gt;   4:  &lt;/span&gt;using&lt;/span&gt; System.ServiceModel;&lt;/pre&gt;  &lt;pre&gt;   5:  &lt;/span&gt;using&lt;/span&gt; System.Threading;&lt;/pre&gt;  &lt;pre&gt;   6:  &lt;/span&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;  &lt;pre&gt;   7:  &lt;/span&gt;using&lt;/span&gt; Microsoft.WindowsAzure.Diagnostics;&lt;/pre&gt;  &lt;pre&gt;   8:  &lt;/span&gt;using&lt;/span&gt; Microsoft.WindowsAzure.ServiceRuntime;&lt;/pre&gt;  &lt;pre&gt;   9:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  10:  &lt;/span&gt;namespace&lt;/span&gt; MvcWebRole1.Caching&lt;/pre&gt;  &lt;pre&gt;  11:  &lt;/span&gt;{&lt;/pre&gt;  &lt;pre&gt;  12:  &lt;/span&gt;    public&lt;/span&gt; class&lt;/span&gt; SynchedCache&lt;/pre&gt;  &lt;pre&gt;  13:  &lt;/span&gt;    {&lt;/pre&gt;  &lt;pre&gt;  14:  &lt;/span&gt;        private&lt;/span&gt; enum&lt;/span&gt; BroadcastType&lt;/pre&gt;  &lt;pre&gt;  15:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  16:  &lt;/span&gt;            Insert,&lt;/pre&gt;  &lt;pre&gt;  17:  &lt;/span&gt;            Remove&lt;/pre&gt;  &lt;pre&gt;  18:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  19:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  20:  &lt;/span&gt;        public&lt;/span&gt; static&lt;/span&gt; void&lt;/span&gt; Insert(string&lt;/span&gt; key, object&lt;/span&gt; value&lt;/span&gt;)&lt;/pre&gt;  &lt;pre&gt;  21:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  22:  &lt;/span&gt;            HttpRuntime.Cache.Insert(key, value&lt;/span&gt;);&lt;/pre&gt;  &lt;pre&gt;  23:  &lt;/span&gt;            Trace.TraceInformation(String.Format(&amp;quot;Added: {0} to key: {1}&amp;quot;&lt;/span&gt;, value&lt;/span&gt;, key));&lt;/pre&gt;  &lt;pre&gt;  24:  &lt;/span&gt;            BroadcastCacheUpdate(BroadcastType.Insert, new&lt;/span&gt; object&lt;/span&gt;[] {key, value&lt;/span&gt;});&lt;/pre&gt;  &lt;pre&gt;  25:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  26:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  27:  &lt;/span&gt;        public&lt;/span&gt; static&lt;/span&gt; void&lt;/span&gt; Remove(string&lt;/span&gt; key)&lt;/pre&gt;  &lt;pre&gt;  28:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  29:  &lt;/span&gt;            HttpRuntime.Cache.Remove(key);&lt;/pre&gt;  &lt;pre&gt;  30:  &lt;/span&gt;            Trace.TraceInformation(String.Format(&amp;quot;Removed key: {0}&amp;quot;&lt;/span&gt;, key));&lt;/pre&gt;  &lt;pre&gt;  31:  &lt;/span&gt;            BroadcastCacheUpdate(BroadcastType.Remove, new&lt;/span&gt; object&lt;/span&gt;[] { key });&lt;/pre&gt;  &lt;pre&gt;  32:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  33:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  34:  &lt;/span&gt;        public&lt;/span&gt; static&lt;/span&gt; object&lt;/span&gt; Get(string&lt;/span&gt; key)&lt;/pre&gt;  &lt;pre&gt;  35:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  36:  &lt;/span&gt;            return&lt;/span&gt; HttpRuntime.Cache.Get(key);&lt;/pre&gt;  &lt;pre&gt;  37:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  38:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  39:  &lt;/span&gt;        private&lt;/span&gt; static&lt;/span&gt; void&lt;/span&gt; BroadcastCacheUpdate(BroadcastType type, params&lt;/span&gt; object&lt;/span&gt;[] args)&lt;/pre&gt;  &lt;pre&gt;  40:  &lt;/span&gt;        {&lt;/pre&gt;  &lt;pre&gt;  41:  &lt;/span&gt;            // iterate over all instances of the internal endpoint except the current role - no need to notify itself&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  42:  &lt;/span&gt;            var current = RoleEnvironment.CurrentRoleInstance;&lt;/pre&gt;  &lt;pre&gt;  43:  &lt;/span&gt;            var endPoints = current.Role.Instances.Where(instance =&amp;gt; instance != current)&lt;/pre&gt;  &lt;pre&gt;  44:  &lt;/span&gt;                            .Select(instance =&amp;gt; instance.InstanceEndpoints[&amp;quot;InternalHttpIn&amp;quot;&lt;/span&gt;]);&lt;/pre&gt;  &lt;pre&gt;  45:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  46:  &lt;/span&gt;            foreach&lt;/span&gt; (var ep in&lt;/span&gt; endPoints)&lt;/pre&gt;  &lt;pre&gt;  47:  &lt;/span&gt;            {&lt;/pre&gt;  &lt;pre&gt;  48:  &lt;/span&gt;                EndpointAddress address =&lt;/pre&gt;  &lt;pre&gt;  49:  &lt;/span&gt;                    new&lt;/span&gt; EndpointAddress(String.Format(&amp;quot;http://{0}/InternalHttpIn&amp;quot;&lt;/span&gt;, ep.IPEndpoint));&lt;/pre&gt;  &lt;pre&gt;  50:  &lt;/span&gt;                ICacheService client = WebRole.Factory.CreateChannel(address);&lt;/pre&gt;  &lt;pre&gt;  51:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  52:  &lt;/span&gt;                try&lt;/span&gt;&lt;/pre&gt;  &lt;pre&gt;  53:  &lt;/span&gt;                {&lt;/pre&gt;  &lt;pre&gt;  54:  &lt;/span&gt;                    string&lt;/span&gt; key = args[0].ToString();&lt;/pre&gt;  &lt;pre&gt;  55:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  56:  &lt;/span&gt;                    switch&lt;/span&gt; (type)&lt;/pre&gt;  &lt;pre&gt;  57:  &lt;/span&gt;                    {&lt;/pre&gt;  &lt;pre&gt;  58:  &lt;/span&gt;                        case&lt;/span&gt; BroadcastType.Insert:&lt;/pre&gt;  &lt;pre&gt;  59:  &lt;/span&gt;                            client.Insert(key, args[1]);&lt;/pre&gt;  &lt;pre&gt;  60:  &lt;/span&gt;                            break&lt;/span&gt;;&lt;/pre&gt;  &lt;pre&gt;  61:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  62:  &lt;/span&gt;                        case&lt;/span&gt; BroadcastType.Remove:&lt;/pre&gt;  &lt;pre&gt;  63:  &lt;/span&gt;                            client.Remove(key);&lt;/pre&gt;  &lt;pre&gt;  64:  &lt;/span&gt;                            break&lt;/span&gt;;&lt;/pre&gt;  &lt;pre&gt;  65:  &lt;/span&gt;                    }&lt;/pre&gt;  &lt;pre&gt;  66:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;  &lt;pre&gt;  67:  &lt;/span&gt;                    ((ICommunicationObject)client).Close();&lt;/pre&gt;  &lt;pre&gt;  68:  &lt;/span&gt;                }&lt;/pre&gt;  &lt;pre&gt;  69:  &lt;/span&gt;                catch&lt;/span&gt; (TimeoutException timeoutException)&lt;/pre&gt;  &lt;pre&gt;  70:  &lt;/span&gt;                {&lt;/pre&gt;  &lt;pre&gt;  71:  &lt;/span&gt;                    Trace.TraceError(&amp;quot;Unable to notify web role instance &amp;#39;{0}&amp;#39;. The service operation timed out. {1}&amp;quot;&lt;/span&gt;, &lt;/pre&gt;  &lt;pre&gt;  72:  &lt;/span&gt;                        ep.RoleInstance.Id, timeoutException.Message);&lt;/pre&gt;  &lt;pre&gt;  73:  &lt;/span&gt;                    ((ICommunicationObject)client).Abort();&lt;/pre&gt;  &lt;pre&gt;  74:  &lt;/span&gt;                }&lt;/pre&gt;  &lt;pre&gt;  75:  &lt;/span&gt;                catch&lt;/span&gt; (CommunicationException communicationException)&lt;/pre&gt;  &lt;pre&gt;  76:  &lt;/span&gt;                {&lt;/pre&gt;  &lt;pre&gt;  77:  &lt;/span&gt;                    Trace.TraceError(&amp;quot;Unable to notify web role instance &amp;#39;{0}&amp;#39;. There was a communication problem. {1} - {2}&amp;quot;&lt;/span&gt;, &lt;/pre&gt;  &lt;pre&gt;  78:  &lt;/span&gt;                        ep.RoleInstance.Id, communicationException.Message, communicationException.StackTrace);&lt;/pre&gt;  &lt;pre&gt;  79:  &lt;/span&gt;                    ((ICommunicationObject)client).Abort();&lt;/pre&gt;  &lt;pre&gt;  80:  &lt;/span&gt;                }&lt;/pre&gt;  &lt;pre&gt;  81:  &lt;/span&gt;            }&lt;/pre&gt;  &lt;pre&gt;  82:  &lt;/span&gt;        }&lt;/pre&gt;  &lt;pre&gt;  83:  &lt;/span&gt;    }&lt;/pre&gt;  &lt;pre&gt;  84:  &lt;/span&gt;}&lt;/pre&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;Finally in your page you can perform operations on the cache like so. &lt;/p&gt;&lt;pre class="csharpcode"&gt;SynchedCache.Insert(key, DateTime.Now.ToString());.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/pre&gt;&lt;p&gt;That call will then notify all the other web roles running. Of course running AppFabric Caching on Azure would be a much better solution once available, but the inter-role communication is still nice to have for other stuff.&lt;/p&gt;&lt;img src="http://blogs.claritycon.com/aggbug.aspx?PostID=108430" width="1" height="1"&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=53bbbb1d84a311b42c618630c560618a&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=53bbbb1d84a311b42c618630c560618a&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>Clarity Blogs: ASP.NET</author>
			<pubDate>Thu, 04 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Can You Really Measure Customer Satisfaction?</title>
			<link>http://www.pheedcontent.com/click.phdo?i=9f9ff8874446348a06993dc17e600361</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290990_Can_You_Really_Measure_Customer_Satisfaction.aspx</pheedo:origLink>
			<description>One question that came up recently during my mid-year review is how am I measuring customer satisfaction with the products that I work on? For example, how can I measurably demonstrate that customers are happy with the work we are doing on ASP.NET MVC and that my team is responding to customer feedback?  Umm, I cant?  At least not right now in a measurable manner. I dont have any such metric and Im not sure how reliable any metric I might come up with will be.  But perhaps thats simply due to a lack...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=9f9ff8874446348a06993dc17e600361&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=9f9ff8874446348a06993dc17e600361&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>youve been HAACKED</author>
			<pubDate>Thu, 04 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>A More Flexible and Secure Method to Configure Silverlight Applications Using the Web.config File from ASP.NET</title>
			<link>http://www.pheedcontent.com/click.phdo?i=260e9601e5c4cb3798bbea3118e8e8d4</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290978_A_More_Flexible_and_Secure_Method_to_Configure_Silverlight_Applications_Using_the_Web_config_File_from_ASP_NET.aspx</pheedo:origLink>
			<description>This article introduces a more flexible and secure method to configure Silverlight applications in the Web.config file from the ASP.NET host application....&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=260e9601e5c4cb3798bbea3118e8e8d4&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=260e9601e5c4cb3798bbea3118e8e8d4&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>The Code Project Latest Articles</author>
			<pubDate>Wed, 03 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>A Simple ASP.NET State Server Failover Scheme</title>
			<link>http://www.pheedcontent.com/click.phdo?i=72dfd46ffbdf88013d16818827a332a4</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290973_A_Simple_ASP_NET_State_Server_Failover_Scheme.aspx</pheedo:origLink>
			<description>Set up failover and load balancing support for web applications that make use of the ASP.NET state server...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=72dfd46ffbdf88013d16818827a332a4&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=72dfd46ffbdf88013d16818827a332a4&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>The Code Project Latest Articles</author>
			<pubDate>Wed, 03 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Video: Zurich Has A Warm Heart</title>
			<link>http://www.pheedcontent.com/click.phdo?i=46713b3886e1d292867089a48772f798</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290965_Video_Zurich_Has_A_Warm_Heart.aspx</pheedo:origLink>
			<description>Check out this short mix of the developer feedback from the recent Zurich stop of DevExpress European road show/tour:  Oliver and I began our epic 4 city journey in London, UK then drove to Frankfurt, Germany and arrived at Zurich, Switzerland.   Our goal is to train developers on the Business Apps with DXperience ASP.NET course. From the attendees feedback below, they enjoyed the class and experience very much:  &amp;#160;   Thanks to everyone in the Zurich class! ...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=46713b3886e1d292867089a48772f798&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=46713b3886e1d292867089a48772f798&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>The ASPx Blog</author>
			<pubDate>Wed, 03 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Creating Instances of UserControls Declaratively and Programmatically</title>
			<link>http://www.pheedcontent.com/click.phdo?i=59f6768daa4dc0a50425a856428527b8</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290958_Creating_Instances_of_UserControls_Declaratively_and_Programmatically.aspx</pheedo:origLink>
			<description>This articles explains creating Instance of User Controls Declaratively and Programmatically...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=59f6768daa4dc0a50425a856428527b8&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=59f6768daa4dc0a50425a856428527b8&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>The Code Project Latest Articles</author>
			<pubDate>Tue, 02 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>ASP.NET Horizontal Menu Control</title>
			<link>http://www.pheedcontent.com/click.phdo?i=7f1b0e40bab8154dc80a9193cbef9111</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290952_ASP_NET_Horizontal_Menu_Control.aspx</pheedo:origLink>
			<description>A few weeks ago, I was working on an ASP.NET web application and needed a simple horizontal menu with a submenu. I decided to use ASP.NET's Menu control: Just drag and drop the control on to the page. Simple enough, but the control did not provide access key and target window support on menu items. I have put together a tutorial on how to include an access key attribute, include a target attribute, and include a site map path.&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=7f1b0e40bab8154dc80a9193cbef9111&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=7f1b0e40bab8154dc80a9193cbef9111&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>ASPAlliance.com - The #1 ASP.NET Community</author>
			<pubDate>Tue, 02 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>AutoMapper hits 1.0!  Download now</title>
			<link>http://www.pheedcontent.com/click.phdo?i=f21e0f32405b03f1dc8fc9dea497de9d</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290946_AutoMapper_hits_1_0_Download_now.aspx</pheedo:origLink>
			<description>Jimmy Bogard just made the announcement that AutoMapper is now 1.0.&amp;#160; Babies grow up so fast.&amp;#160; Jimmy has cultivated this project since its infancy, although I think almost everyone from Headspring has at least one commit (I think I had a total of 3 commits, perhaps).  Anyway, go download and upgrade now.  For those who dont know, AutoMapper is an object-to-object mapper, and you can read more about it on the CodePlex documentation wiki as well as inside the book, ASP.NET MVC in Action.&amp;#160;...&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=f21e0f32405b03f1dc8fc9dea497de9d&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=f21e0f32405b03f1dc8fc9dea497de9d&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>Jeffrey Palermo</author>
			<pubDate>Mon, 01 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Calculated column in RadGridView + math expressions</title>
			<link>http://www.pheedcontent.com/click.phdo?i=ea052ff479713e04a86d82d05a65fa28</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290941_Calculated_column_in_RadGridView_math_expressions.aspx</pheedo:origLink>
			<description>&lt;p&gt;When the data layer does not allow to perform calculations we often need to harness the UI.&lt;/p&gt; &lt;p&gt;Here is a a simple case&amp;nbsp; - in our business object we have the &lt;strong&gt;Price&lt;/strong&gt; and the &lt;strong&gt;Count&lt;/strong&gt; properties. We will have RadGridView to calculate the &lt;strong&gt;Total&lt;/strong&gt;&amp;nbsp; for us in a calculated column.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a rel='nofollow' href="http://blogs.telerik.com/Libraries/MetaBlogLib/calculated_column_04E117B3.sflb"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="calculated_column" border="0" alt="calculated_column" src="http://blogs.telerik.com/Libraries/MetaBlogLib/calculated_column_thumb_39317894.sflb" width="376" height="116"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;a rel='nofollow' href="http://blogs.telerik.com/Libraries/MetaBlogLib/CalculatedColumns_static_60F42C59.sflb" target="_blank"&gt;Please download this sample project&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;If you peek into the sample project you will notice we are using a pretty standard Silverlight approach : &lt;/p&gt; &lt;p&gt;We bind the value of the calculated column with a Binding Converter : &lt;/p&gt;&lt;pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&amp;lt;&lt;/span&gt;telerik&lt;/span&gt;:GridViewDataColumn&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; Header&lt;/span&gt;="Total"&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; Background&lt;/span&gt;="Bisque"&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; DataMemberBinding&lt;/span&gt;="{Binding Converter={StaticResource CalculatingConverter}}"&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; TextAlignment&lt;/span&gt;="Right"&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;The calculation logic is in the Convert method of CalculatingConverter.cs&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; public&lt;/span&gt; object&lt;/span&gt; Convert(object&lt;/span&gt; value&lt;/span&gt;, Type targetType, object&lt;/span&gt; parameter, System.Globalization.CultureInfo culture)&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        {&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; return&lt;/span&gt; ((Item)value&lt;/span&gt;).Price * ((Item)value&lt;/span&gt;).Count;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;For simple scenarios it should do the trick . The bad thing is we have hardcoded the converter to our Item class with Price and Count properties.&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;What if we need a &lt;strong&gt;more dynamic approach&lt;/strong&gt;  - to give the RadGridView a string Expression like &lt;strong&gt;Price*Count&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt; and have it evaluate and calculate for us. &lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;font size="4" face="Arial"&gt;&lt;strong&gt;The Poor Mans Expression Parser&lt;/strong&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;strong&gt;&lt;font face="Arial"&gt;&lt;/font&gt;&lt;/strong&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;A popular hack when a simple expression parser is needed in Silverlight is to call the javascript eval function from the hosting browser window. &lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face="Arial"&gt;Here is how our dynamic expression converter will look like : &lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;public&lt;/span&gt; class&lt;/span&gt; CalculatingConverter : IValueConverter&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;    {&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; public&lt;/span&gt; object&lt;/span&gt; Convert(object&lt;/span&gt; value&lt;/span&gt;, Type targetType, object&lt;/span&gt; parameter, System.Globalization.CultureInfo culture)&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        {&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; string&lt;/span&gt; stringexpression = BuildExpression(value&lt;/span&gt;, parameter.ToString());&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; return&lt;/span&gt; HtmlPage.Window.Invoke("eval&lt;/span&gt;", stringexpression);&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; private&lt;/span&gt; string&lt;/span&gt; BuildExpression(object&lt;/span&gt; value&lt;/span&gt;, string&lt;/span&gt; parameter)&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        {&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;            StringBuilder sb = new&lt;/span&gt; StringBuilder(parameter);&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; foreach&lt;/span&gt; (PropertyInfo propertyInfo in&lt;/span&gt; value&lt;/span&gt;.GetType().GetProperties())&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;            {&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; if&lt;/span&gt; (propertyInfo.CanRead)&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;                {&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; object&lt;/span&gt; o = propertyInfo.GetValue(value&lt;/span&gt;, null&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;                    sb.Replace(propertyInfo.Name, o.ToString());&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;                }&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;            } &lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; return&lt;/span&gt; sb.ToString();&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; public&lt;/span&gt; object&lt;/span&gt; ConvertBack(object&lt;/span&gt; value&lt;/span&gt;, Type targetType, object&lt;/span&gt; parameter, System.Globalization.CultureInfo culture)&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        {&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt; throw&lt;/span&gt; new&lt;/span&gt; NotImplementedException();&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;    }&lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;This gives us the power to pass the column a string expression - Price*Count ( as a parameter of the value converter ): &lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px"&gt;DataMemberBinding="{Binding Converter={StaticResource CalculatingConverter},ConverterParameter='&lt;strong&gt;Price*Count&lt;/strong&gt;'}" &lt;/pre&gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;For your copy/paste needs please download the &lt;/pre&gt; &lt;p&gt; &lt;a rel='nofollow' href="http://blogs.telerik.com/Libraries/MetaBlogLib/CalculatedColumns_dynamic_5FAB7F7B.sflb" target="_blank"&gt;dynamic expressions version of the sample project&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=ea052ff479713e04a86d82d05a65fa28&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=ea052ff479713e04a86d82d05a65fa28&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>the telerik blogs</author>
			<pubDate>Mon, 01 Feb 2010 00:00:00 GMT</pubDate>
		</item>
		<item>
			<title>Live Demo of Telerik WebUI Test Studio this Thursday</title>
			<link>http://www.pheedcontent.com/click.phdo?i=13a6f8569e24cfeaaf37e468710d6e54</link>
			<pheedo:origLink>http://www.dotnetslackers.com/ASP_NET/re-290938_Live_Demo_of_Telerik_WebUI_Test_Studio_this_Thursday.aspx</pheedo:origLink>
			<description>&lt;a rel='nofollow' href="https://www1.gotomeeting.com/register/280488889"&gt;Join &lt;/a&gt;our weekly Live Demo of &lt;a rel='nofollow' href="http://www.telerik.com/products/web-testing-tools/webui-test-studio-features.aspx"&gt;Telerik WebUI Test Studio&lt;/a&gt; on Thursday, Feb. 4th at 11AM EST! This is a short (~30min) webinar that provides an overview of the product and helps you get quickly started with Automated UI Testing for AJAX and Silverlight. Jump-start your evaluation and save time by having all your questions answered by the experts.  Register now!&lt;/a&gt;&lt;p&gt;Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: &lt;a href='http://dotnetslackers.com/articles/default.aspx'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;br clear=&quot;both&quot; style=&quot;clear: both;&quot;/&gt;
&lt;a href=&quot;http://ads.pheedo.com/click.phdo?s=13a6f8569e24cfeaaf37e468710d6e54&amp;p=1&quot;&gt;&lt;img alt=&quot;&quot; style=&quot;border: 0;&quot; border=&quot;0&quot; src=&quot;http://ads.pheedo.com/img.phdo?s=13a6f8569e24cfeaaf37e468710d6e54&amp;p=1&quot;/&gt;&lt;/a&gt;
&lt;img alt=&quot;&quot; height=&quot;0&quot; width=&quot;0&quot; border=&quot;0&quot; style=&quot;display:none&quot; src=&quot;http://a.rfihub.com/eus.gif?eui=2225&quot;/&gt;</description>
			<author>the telerik blogs</author>
			<pubDate>Mon, 01 Feb 2010 00:00:00 GMT</pubDate>
		</item>
	</channel>
</rss>