<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Todd Anglin's blog</title>
    <description>Todd Anglin's blog</description>
    <link>http://blogs.telerik.com/ToddAnglin/Posts.aspx</link>
    <docs>http://backend.userland.com/rss</docs>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ToddAnglinOnTelerik" type="application/rss+xml" /><item>
      <title>Telerik Q2 2009 Release Week Webinars</title>
      <description>&lt;p&gt;[Cross posted from &lt;a href="http://telerikwatch.com/2009/07/telerik-q2-2009-webinar-week-prize.html"&gt;Telerik Watch&lt;/a&gt;]&lt;/p&gt; &lt;p&gt;Smell that? That's a freshly baked release from Telerik that's just about ready to &amp;quot;officially&amp;quot; launch. The Q2 2009 release is one of the biggest releases in Telerik's history, again delivering simultaneous updates to all 7 Telerik product lines at one time. An update of this scale is bound to have lots new and interesting stuff, and we can't wait to put it in your hands so you can start playing with it. &lt;strong&gt;The official launch of Q2 2009 is Monday, July 6th&lt;/strong&gt;, and to help you jump-off with the new bits and maximize your productivity with the Telerik tools, we'll be running &lt;a href="http://telerikwatch.com/search/label/Webinar%20Week"&gt;another release &amp;quot;Webinar Week.&amp;quot;&lt;/a&gt; &lt;br /&gt;But before I reveal the schedule for the Webinar Week, let me tell you about the prizes!     &lt;br /&gt;There will be two ways to win prizes during the Q2 Webinar Week:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Every webinar will award 1 or 2 (depending on the products covered) individual product suite licenses to the people that attend the live event. All you have to do to enter is show-up to the live event and you will be in the pool for a randomly selected winner at the conclusion of the webinar (winners will be notified via email, so don't register with a spam address unless you don't care to claim your prize). &lt;/li&gt; &lt;li&gt;For every live webinar you attend during the webinar week, you will also be entered in the drawing for the &lt;strong&gt;Webinar Week Grand Prize:&lt;/strong&gt; a &lt;a href="http://www.telerik.com/purchase.aspx"&gt;Telerik Premium Collection license&lt;/a&gt; (valued at $1300) and a pass to the &lt;a href="http://pnpsummit.com/west2009/west2009.aspx"&gt;2009 PNP Summit&lt;/a&gt; (a $1900 value)! The more webinars you attend live, the better your odds are at winning the prize valued at over $3000. &lt;/li&gt; &lt;/ol&gt; &lt;p&gt;Plus, to get things kicked-off with a bang, we will be giving away a Premium Collection license to the winner of the first live webinar drawing (instead of a individual suite license), so you definitely don't want to miss the live events. &lt;/p&gt; &lt;p&gt; &lt;br /&gt;Now for the schedule. Things get kicked-off on Tuesday, July 7th and run through the end of the week. Webinars will be held everyday at &lt;strong&gt;11:00 AM Eastern Time&lt;/strong&gt; and all will be recorded for Telerik TV on-demand viewing. The topics covered will be: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Tuesday, July 7th - Q2 2009: What's New?&lt;/strong&gt; &lt;br /&gt;Join me for a general overview of the Q2 release and high-level intro to what's new       &lt;br /&gt;&lt;strong&gt;PRIZE:&lt;/strong&gt; 1 Premium Bundle Collection license       &lt;br /&gt;&lt;a href="https://www1.gotomeeting.com/register/162520544"&gt;Register for webinar now&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Wednesday, July 8th - RadControls for ASP.NET AJAX and WinForms&lt;/strong&gt; &lt;br /&gt;Join me again for a more in-depth look at what's new in the RadControls for WinForms and ASP.NET AJAX       &lt;br /&gt;&lt;strong&gt;PRIZE:&lt;/strong&gt;1 RadControls for ASP.NET AJAX license, 1 RadControls for WinForms license       &lt;br /&gt;&lt;a href="https://www1.gotomeeting.com/register/705011672"&gt;Register for webinar now&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Thursday, July 9th - OpenAccess ORM        &lt;br /&gt;&lt;/strong&gt;Join Telerik DE Gabe Sumner for a closer look at what's new in Telerik OpenAccess ORM       &lt;br /&gt;&lt;strong&gt;PRIZE:&lt;/strong&gt; 1 OpenAccess ORM license       &lt;br /&gt;&lt;a href="https://www1.gotomeeting.com/register/911373289"&gt;Register for webinar now&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Friday, July 10th - RadControls for Silverlight / WPF&lt;/strong&gt; &lt;br /&gt;Join Telerik DE Evan Hutnick for a closer look at what's new in the RadControls for Silverlight and the RadControls for WPF       &lt;br /&gt;&lt;strong&gt;PRIZE:&lt;/strong&gt; 1 RadControls for Silverlight license, 1 RadControls for WPF license       &lt;br /&gt;&lt;a href="https://www1.gotomeeting.com/register/853506400"&gt;Register for webinar now&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; Registration links for the webinars will be available very soon, so be sure to register early to save your seat. The Q2 2009 Webinar Week is the best way to get started with the Telerik Q2 2009 release, and with all the great prizes to go around, you definitely don't want to miss these free events. We'll see you live next week!&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/7AqwAZ1yWkA" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/7AqwAZ1yWkA/telerik_q2_2009_release_week_webinars.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-07-03/telerik_q2_2009_release_week_webinars.aspx</comments>
      <guid isPermaLink="false">57c3b447-8d57-474f-bf2d-7e283c0a1d35</guid>
      <pubDate>Fri, 03 Jul 2009 00:32:18 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-07-03/telerik_q2_2009_release_week_webinars.aspx</feedburner:origLink></item>
    <item>
      <title>Gracefully degrade RadChart for Silverlight in ASP.NET</title>
      <description>&lt;p&gt;&lt;a href="http://tv.telerik.com/silverlight/webinar/radcontrols_silverlight_aspnet"&gt;In a recent webinar&lt;/a&gt;, I showed an example of how you can build a superior user experience in an ASP.NET website by using RadChart for Silverlight. The Telerik Silverlight chart has animations, rich rendering, and is much more visual appealing than the “static” RadChart for ASP.NET. But while the Silverlight chart is a great way to enhance data visualizations in your ASP.NET site, how do you handle users that don’t have Silverlight installed?&lt;/p&gt; &lt;p&gt;One approach is to implement “graceful degradation.” Graceful degradation is an important and familiar principle in web design, and essentially it means this: if you build features into your site that take advantage of the latest and greatest technologies (like Silverlight), make sure you have some mechanism to provide an alternative experience for those users not living on the cutting edge. In our case, that means if Silverlight is not installed, we still want to display a chart, it just wont have the bells and whistles Silverlight offers. Specifically, we want our site to &lt;em&gt;automatically&lt;/em&gt; display a RadChart for ASP.NET (which is simply an image generated on the server and sent to the client, so it works on &lt;em&gt;all&lt;/em&gt; browsers) if Silverlight is not available.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;SIVLERLIGHT’S “NOSCRIPT” TAG&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Similar to the HTML &amp;lt;noscript&amp;gt; tag, which is used to display content only when JavaScript is not available, the ASP.NET Silverlight control has a handy template called the “PluginNotInstalledTemplate.” Any content you place inside of this template will be automatically displayed to the user if Silverlight is not installed. If you do not specify any content for this template, Microsoft will display the “Install Silverlight” image by default.&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Silverlight&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;xamlChart&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;~/ClientBin/RadChartControl.xap&amp;quot;&lt;/span&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #ff0000"&gt;MinimumVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2.0.31005.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PluginNotInstalledTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;&amp;lt;!-- Any content can be placed here, including ServerControls --&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;PluginNotInstalledTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Silverlight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;If you are not using an ASPX page to host your Silverlight, you can accomplish a similar feat in raw HTML by adding any content you want between the opening and closing Silverlight HTML &amp;lt;object&amp;gt; tags, like this:&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;object&lt;/span&gt; &lt;span style="color: #ff0000"&gt;data&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;data:application/x-silverlight,&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;application/x-silverlight-2&amp;quot;&lt;/span&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #ff0000"&gt;width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100%&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;100%&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;param&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;source&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ClientBin/RadChartControl.xap&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;&amp;lt;!-- Your HTML content here will be displayed if Silverlight is missing --&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;object&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;We’ll focus primarily on the ASP.NET experience, though, since it is obviously required for our RadChart “graceful degrade” scenario.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;ENABLING THE GRACEFUL DEGRADE&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;While many people are aware of the PluginNotInstalledTemplate, not as many seem to be aware of the fact that you &lt;em&gt;can&lt;/em&gt; include ServerControls in this template. That means we can include a RadChart for ASP.NET AJAX in our plug-in template and easily configure it, just as we would on any other ASP.NET page.&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Silverlight&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;xamlChart&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;~/ClientBin/RadChartControl.xap&amp;quot;&lt;/span&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #ff0000"&gt;MinimumVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;2.0.31005.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;PluginNotInstalledTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;&amp;lt;!--RadChart for ASP.NET to display if Silverlight not available--&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadChart&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;RadChart1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;server&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;AutoLayout&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Skin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Black&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Series&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:ChartSeries&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Series 1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:ChartSeries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Series&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadChart&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;PluginNotInstalledTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;asp:Silverlight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Then, in the code behind of our ASP.NET page (or UserControl, depending on your implementation), we simply bind and render the chart when the page loads.&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Bind the RadChart to enable &amp;quot;graceful degredation&amp;quot;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Get the RadChart from the Silverlight PluginNotInstalledTemplate&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    var chart = xamlChart.FindControl(RadChart1.ID) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; RadChart;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;(chart != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    {&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Configure and bind your RadChart (example settings)&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        chart.ChartTitle.TextBlock.Text = ChartTitle;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        chart.Width = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Unit(Width);&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        chart.Height = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Unit(Height);&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        chart.DataSource = JsonData.FromJSON&amp;lt;List&amp;lt;CategorySalesFor1997&amp;gt;&amp;gt;();&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        chart.DataBind();&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    }&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;}&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;And that’s it. With this simple setup, you can display the Silverlight RadChart when Silverlight is available and the ASP.NET chart image when it’s not. This same principle can be applied to other Silverlight/ASP.NET controls, such as RadUpload, so this is not something that only works with RadChart. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;THE RESULTS&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When implemented correctly, the end result is seamless for your users. If an user has Silverlight installed, they will see the RadChart for Silverlight, like this:&lt;/p&gt; &lt;p&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="slChart" border="0" alt="slChart" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-slChart_e54479ad-1d47-4aa0-b22d-2255d9568b3e.sflb" width="427" height="354" /&gt; &lt;/p&gt; &lt;p&gt;If they do not have Silverlight installed, they will automatically see the more accessible RadChart for ASP.NET AJAX, like this:&lt;/p&gt; &lt;p&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="aspnetChart" border="0" alt="aspnetChart" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-aspnetChart_5aa54329-f837-40f8-bb39-d998e42a34f0.sflb" width="418" height="345" /&gt; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;I hope this technique helps you effectively leverage Silverlight in your ASP.NET projects without worrying about leaving your non-Silverlight users behind!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/y-JYIO-fZvc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/y-JYIO-fZvc/gracefully_degrade_radchart_for_silverlight_in_asp_net.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-05-21/gracefully_degrade_radchart_for_silverlight_in_asp_net.aspx</comments>
      <guid isPermaLink="false">36782a7e-9575-42a6-bdde-401d08c9a84f</guid>
      <pubDate>Thu, 21 May 2009 22:18:38 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-05-21/gracefully_degrade_radchart_for_silverlight_in_asp_net.aspx</feedburner:origLink></item>
    <item>
      <title>Telerik Web Mail Demo on Azure</title>
      <description>&lt;p&gt;&lt;a href="http://telerik.cloudapp.net/"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="webmail_morecloud" border="0" alt="webmail_morecloud" align="right" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-TelerikWebMailDemoonAzure_145B7-webmail_morecloud_1c95c774-c594-4c0d-8564-002164ebe428.sflb" width="268" height="228" /&gt;&lt;/a&gt; I recently showed you how to get started working with the &lt;a href="http://www.telerik.com/aspnet-ajax"&gt;RadControls for ASP.NET AJAX&lt;/a&gt; on Azure. It’s really a lot easier than you might think. If you missed the first two posts (and the follow-up videos), here they are for quick reference:&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/toddanglin/posts/09-04-13/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx"&gt;RadControls for ASP.NET AJAX on Azure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/toddanglin/posts/09-04-17/deploying_radcontrols_to_azure.aspx"&gt;Deploying RadControls to Azure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/toddanglin/posts/09-05-07/azure_videos_now_on_telerik_tv.aspx"&gt;Azure Videos on Telerik TV&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Today, I updated the &lt;a href="http://telerik.cloudapp.net/"&gt;live running Telerik demo on Azure&lt;/a&gt; to feature the complete &lt;a href="http://demos.telerik.com/webmail/"&gt;Telerik Web Mail demo&lt;/a&gt;! That means you can now see almost all of the RadControls for ASP.NET AJAX running live on the Azure Cloud. Included in the demo are RadGrid, RadEditor, RadSplitter, RadMenu, RadAjax, RadTreeView, RadCombobox, RadScheduler, RadCalendar, RadWindow, RadSkinManager, RadStyleSheetManager, RadScriptManager, and RadPanelBar. This should be full “proof” that you’re ready to go if you want to build new applications for the Azure cloud with the RadControls for ASP.NET AJAX.&lt;/p&gt; &lt;p&gt;But what if you’re thinking about porting an &lt;em&gt;existing&lt;/em&gt; app built with the RadControls to the cloud in the future? Fortunately, as the new live demo proves, that’s easy, too. The Web Mail application running on Azure is the exact same source as the app running off the cloud. The only change I’ve made- that is still a work in progress- is changing the way data access works (since I can’t run SQL Express on the Azure cloud…yet). Currently the app is using “dummy data” and XML data, but soon it will be wired-up to a external WCF service layer that will return database data to the cloud app. And whenever SQL Data Services for Azure makes table-based storage available, the demo will feature even more cloud integration.&lt;/p&gt; &lt;p&gt;There are a few features and pages (such as the Contacts page) that don’t currently fully function as a result of these data binding changes, but for the most part, you can interact with the app as normal and see the RadControls functioning correctly. So whether the cloud is for you or not, Telerik is here and ready to support your cloud UI development efforts!&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;a href="http://telerik.cloudapp.net/"&gt;View the Web Mail demo running live on the Azure cloud&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/SGxuCxKp3Nc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/SGxuCxKp3Nc/telerik_web_mail_demo_on_azure.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-05-19/telerik_web_mail_demo_on_azure.aspx</comments>
      <guid isPermaLink="false">8f58c085-2b9e-45d9-bee3-5985354ffcea</guid>
      <pubDate>Tue, 19 May 2009 23:09:56 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-05-19/telerik_web_mail_demo_on_azure.aspx</feedburner:origLink></item>
    <item>
      <title>Azure videos now on Telerik TV</title>
      <description>&lt;p&gt;If you followed my posts last week, you learned that the RadControls for ASP.NET AJAX are “cloud ready.” You can take the RadControls for ASP.NET AJAX that you know and love today and confidently use them in Cloud Service applications that target the Microsoft Azure cloud environment. In case you missed those posts, you can catch-up now:&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/toddanglin/posts/09-04-13/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx"&gt;RadControls for ASP.NET AJAX on Azure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/toddanglin/posts/09-04-17/deploying_radcontrols_to_azure.aspx"&gt;Deploying RadControls to Azure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;I’m happy to relay that the videos that are related to these blog posts are now both available on Telerik TV for your immediate viewing pleasure. Each video illustrates the concepts defined in the blog posts, and together they should give you a complete overview of how you start, build, and deploy an ASP.NET application to the cloud with the RadControls. Both videos also check-in at less than 10 minutes, so they should be easy to digest- quick and to the point. Check the videos out at the following links:&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;a href="http://tv.telerik.com/aspnet/video/getting_started_with_radcontrols_azure"&gt;Getting Started with RadControls in Azure&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://tv.telerik.com/aspnet/video/deploying_azure_cloud"&gt;Deploying to the Azure Cloud&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;I hope you enjoy these additional resources. Also, don’t forget that there is a “live” app running in the cloud at &lt;a href="http://telerik.cloudapp.net"&gt;http://telerik.cloudapp.net&lt;/a&gt; that shows some RadControls running live on Azure. That app will be updated very soon to include even more of the RadControls, so check back soon to see an expanded demo running in the cloud.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Enjoy.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/dMCF6w4lHE4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/dMCF6w4lHE4/azure_videos_now_on_telerik_tv.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-05-07/azure_videos_now_on_telerik_tv.aspx</comments>
      <guid isPermaLink="false">0b3ca408-2f38-407c-9d2f-c22df02a000e</guid>
      <pubDate>Thu, 07 May 2009 23:55:00 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-05-07/azure_videos_now_on_telerik_tv.aspx</feedburner:origLink></item>
    <item>
      <title>Designing N-Tier Applications with OpenAccess ORM</title>
      <description>&lt;p&gt;A very important question recently crossed my inbox, and it essentially asked:&lt;/p&gt; &lt;p&gt;&lt;em&gt;“Can you design and build Enterprise-grade n-tier applications with OpenAccess? Or does it force you violate principles of good multi-tier application design to make the ORM features work?”&lt;/em&gt;&lt;/p&gt; &lt;p&gt;It was a great question and I was surprised to find that there is not more info in the online docs to address this. So, to help everyone benefit from this question’s answer, here are some details about building n-tier applications with OpenAccess.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT DOES GOOD N-TIER ARCHITECTURE LOOK LIKE WITH OPENACCESS?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Let me preface this discussion by saying there is no “absolute” right or wrong way to architect an application. The approach highlighted here is just &lt;em&gt;one way&lt;/em&gt; that will help you build applications that use OpenAccess with clean separation of concerns and respect for principles of &lt;a href="http://en.wikipedia.org/wiki/Multitier_architecture"&gt;multi-tiered application design&lt;/a&gt;. With that out of the way, a “typical” multi-tier app built with OpenAccess should look something like this:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;b&gt;Entities (or Model):&lt;/b&gt; Contains your persistent classes; Project is “OpenAccess Enabled” &lt;i&gt;to define&lt;/i&gt; Persistent Classes (PCs) and includes DB mapping info in the config file. The persistent classes in this project can be created via the Forward or Reverse Mapping OpenAccess wizards.&lt;/li&gt; &lt;li&gt;&lt;b&gt;Data Layer (Optional):&lt;/b&gt; Optional, in my opinion, since the actual “data plumbing” will be handled “automatically” inside OA. I prefer to skip this layer, but it can be used for storing your LINQ queries and returning data to your business layer, if desired (and if you don’t want LINQ in your business layer).&lt;/li&gt; &lt;li&gt;&lt;b&gt;Business Layer: &lt;/b&gt;Provides “Repository” (or “Manager”) classes that define operations on model (such as FindAll, FindById, Insert, etc.). Acquires ObjectScope used to manipulate objects in the database. “OA Enabled” &lt;i&gt;to consume&lt;/i&gt; PCs, which adds ObjectScopeProvider to project (but does not add mapping info to project)&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Layer (Optional):&lt;/strong&gt; To build an app that is ready for client-oriented technology (like Silverlight and ASP.NET AJAX 4.0), it is usually smart to build a service layer on top of your business logic. The service layer consumes your business layer “data manager” classes and exposes the operations as service endpoints. &lt;/li&gt; &lt;li&gt;&lt;b&gt;Presentation Layer:&lt;/b&gt; Consumes business layer repositories (if no service layer) &lt;em&gt;or&lt;/em&gt; consumes services. The presentation layer can be completely ignorant of OpenAccess and it has no need to be “OA Enabled.”&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;The project linking would look some like this:&lt;/p&gt; &lt;p&gt;&lt;b&gt;Presentation&lt;/b&gt; consumes &lt;strong&gt;Services &lt;/strong&gt;consumes &lt;b&gt;Business&lt;/b&gt; consumes &lt;b&gt;Data&lt;/b&gt; (if present) consumes &lt;b&gt;Model&lt;/b&gt;&lt;/p&gt; &lt;p&gt;The only time you might “break” this direct inheritance tree is if you want to re-use your model classes in your other tiers for easier data binding (i.e. I want to bind to return a List&amp;lt;ModelType&amp;gt; vs. some intermediate class type). Still, in that case, you’re only using the class model for binding- you’re not doing any data access outside of your data access tier. Here is the same architecture in picture:&lt;/p&gt; &lt;p&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="OpenAccess Architecture Layers" border="0" alt="OpenAccess Architecture Layers" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-DesigningNTierApplicationswithOpenAccess_105CE-OpenAccessArchitectureLayers_8e7974ce-ff90-4aa9-ad41-b0876e71a655.sflb" width="570" height="445" /&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT PROJECTS NEED TO BE OPENACCESS ENABLED?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;One of the bigger points of confusion when it comes to using OpenAccess in n-tier applications seems to be which layers require you to run the “OpenAccess Enable” wizards. To be clear, there are two types of OpenAccess enabling provided by the wizard in Visual Studio:&lt;/p&gt; &lt;p&gt;1. &lt;b&gt;Project &lt;em&gt;Defines&lt;/em&gt; Persistent Classes:&lt;/b&gt; Adds configuration info to App.Config containing DB mappings, Adds refs to OA assemblies&lt;/p&gt; &lt;p&gt;2. &lt;b&gt;Project &lt;em&gt;Consumes&lt;/em&gt; Persistent Classes/Connects to DB:&lt;/b&gt; Adds references to OA assemblies, Adds ObjectScopeProvider class (for help managing ObjectScope), Adds connection info to project configuration file&lt;/p&gt; &lt;p&gt;In general, the only layers that need OA enabling are your model (where your persistent classes are defined) and your Data or Business layer (or whichever layer you’re using to actually execute queries against the DB).Other layers, like your Presentation layer, do &lt;em&gt;not&lt;/em&gt; need to be enabled. And in all cases, when you run the wizard, you’re &lt;em&gt;not&lt;/em&gt; adding references to other projects in your solution- just to the OpenAccess assemblies.&lt;/p&gt; &lt;p&gt;I hope that helps clear-up the general approach to using OpenAccess to build n-tier applications. OpenAccess is definitely powerful enough and flexible enough to handle Enterprise architectures, so it’s usually just a matter of understanding &lt;em&gt;how &lt;/em&gt;and not &lt;em&gt;if&lt;/em&gt; OpenAccess can do what you want. &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/ieZ_6NGgAsc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/ieZ_6NGgAsc/designing_n-tier_applications_with_openaccess_orm.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-04-28/designing_n-tier_applications_with_openaccess_orm.aspx</comments>
      <guid isPermaLink="false">63b8b975-ceeb-4761-a50c-14136ab3407b</guid>
      <pubDate>Tue, 28 Apr 2009 11:15:00 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-04-28/designing_n-tier_applications_with_openaccess_orm.aspx</feedburner:origLink></item>
    <item>
      <title>Web 2.0 font sizes with RadInput</title>
      <description>&lt;p&gt;If you’ve spent much time visiting “web 2.0” sites, you know that large font sizes are totally “in vogue” for data entry forms. Not only are they easy for all audiences to read, but they also imply a certain level of simplicity on a website. In fact, there are even some &lt;a href="http://www.baekdal.com/articles/Usability/new-minimum-font-size/"&gt;UX experts suggesting&lt;/a&gt; larger font sizes are better now that high-resolution monitors are the norm and not the exception.&lt;/p&gt; &lt;p&gt;If you’ve got a “beautifully designed” web 2.0-style site, though, and you’re working with RadInput, you know that the default skins “force” their own font size. What do you do if you want the powerful real-time input validation of RadInput &lt;em&gt;and&lt;/em&gt; your big web 2.0 fonts?&lt;/p&gt; &lt;p&gt;Fortunately, the problem is easy to solve with a very slightly customized RadInput skin (which is available at the bottom of this post). Essentially, the custom skin just removes the CSS “font-size” declarations from the RadInput Default skin, enabling your RadInput controls (which includes textboxes configured with RadInputManager) to inherit the font-size from your site’s main CSS definition. The effect transforms a form with RadInput from this:&lt;/p&gt; &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="RadInputBigFonts_default" border="0" alt="RadInputBigFonts_default" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-RadInputBigFonts_default_5c904922-a1f1-4afd-b9b0-500ac7cd7033.sflb" width="471" height="257" /&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;To a form with RadInput’s inheriting the larger page font size:&lt;/p&gt; &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="RadInputBigFonts_big" border="0" alt="RadInputBigFonts_big" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-RadInputBigFonts_big_3ef99d9a-a17a-4598-aee7-d8755e55d8df.sflb" width="544" height="317" /&gt; &lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Now you can take advantage of all the power RadInput and RadInputManager provide without disrupting your “web 2.0” look and feel. To use the custom skin (again, provided below), you simply need to follow these steps:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Copy the “Input.Basic.css” and “Input” folder in the attached ZIP to your App_Themes folder&lt;/li&gt; &lt;li&gt;Make sure your page is configured to use the Theme containing your custom skin (via the Page-level Theme property)&lt;/li&gt; &lt;li&gt;On your RadInput or RadInputManager controls, set &lt;strong&gt;EnabledEmbeddedSkins &lt;/strong&gt;to &lt;strong&gt;False&lt;/strong&gt; and set the &lt;strong&gt;Skin&lt;/strong&gt; property to “&lt;strong&gt;Basic&lt;/strong&gt;”&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;And that’s it! I hope you enjoy the custom skin and I hope this helps those of you working with “web 2.0” designs better leverage RadInput.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/Libraries/Todd_Anglin/InputBasicSkin.sflb"&gt;Download custom skin “Basic” for RadInput&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/vRaeXUjU8p8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/vRaeXUjU8p8/web_2_0_font_sizes_with_radinput.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-04-22/web_2_0_font_sizes_with_radinput.aspx</comments>
      <guid isPermaLink="false">93983696-e6c2-4fa2-bf96-1285d66c2904</guid>
      <pubDate>Wed, 22 Apr 2009 17:52:10 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-04-22/web_2_0_font_sizes_with_radinput.aspx</feedburner:origLink></item>
    <item>
      <title>Deploying RadControls to Azure</title>
      <description>&lt;p&gt;&lt;img style="border-right-width: 0px; margin: 0px 0px 10px 10px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="telerikCloudReady" border="0" alt="telerikCloudReady" align="right" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-DeployingRadControlstoAzure_EC18-telerikCloudReady_f27b342f-f9a9-49eb-af9b-659dd6cc233d.sflb" width="213" height="255" /&gt; In the &lt;a href="http://blogs.telerik.com/toddanglin/posts/09-04-13/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx"&gt;first part of this short series&lt;/a&gt; covering the &lt;a href="http://www.telerik.com/aspnet-ajax"&gt;RadControls for ASP.NET AJAX&lt;/a&gt; in the cloud, I showed you how you could quickly (and easily) start a new Azure Cloud Service project, add the RadControls, and then debug the project locally. The next step, of course, is taking that locally built and debugged project and deploying it to the “real” cloud fabric, hosted by Microsoft in their data center (not yet data &lt;em&gt;centers&lt;/em&gt;…). That is where the rubber meets the proverbial road and we find out if the Telerik RadControls are &lt;em&gt;really&lt;/em&gt; “cloud ready.”&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW DO YOU DEPLOY TO AZURE?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Assuming you’ve built a new cloud service application (using the VS template) and you’ve debugged it locally and everything is working, you only need to complete these steps to deploy your app to the cloud:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;In Visual Studio, right-click on the “&lt;strong&gt;Roles&lt;/strong&gt;” project (not the “Web” project that has your .aspx files) and select “&lt;strong&gt;Publish…&lt;/strong&gt;” &lt;/li&gt; &lt;li&gt;Visual Studio will now build and package your project for Azure      &lt;ul&gt; &lt;li&gt;&lt;em&gt;IMPORTANT NOTES:&lt;/em&gt; &lt;/li&gt; &lt;li&gt;&lt;strong&gt;1)&lt;/strong&gt; You must use the context menu to Publish the project. The Publish option from the Build menu does not perform the correct actions. &lt;/li&gt; &lt;li&gt;&lt;strong&gt;2)&lt;/strong&gt; The Publish step bundles &lt;em&gt;all&lt;/em&gt; files required to deploy your project to Azure, including the RadControls assembly &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;Once the project is done publishing, VS will &lt;em&gt;automatically&lt;/em&gt; launch your default browser and direct it to the Azure Developer Portal. VS will also automatically open the folder that contains the two files produced by the Publish action: &lt;em&gt;YourProjectName.cspkg&lt;/em&gt; and &lt;em&gt;YourProjectName.cscfg&lt;/em&gt; &lt;/li&gt; &lt;li&gt;Log-in to Azure and (assuming you have a CTP token) create a New “Hosted Services” Project &lt;/li&gt; &lt;li&gt;After you’ve given the project a name and description, click the “&lt;strong&gt;Deploy…&lt;/strong&gt;” button under the “Staging” cube icon &lt;/li&gt; &lt;li&gt;Upload your &lt;strong&gt;.cspkg &lt;/strong&gt;and &lt;strong&gt;.cscfg&lt;/strong&gt; files via the provided form &lt;/li&gt; &lt;li&gt;Wait for an unknown length of time (could be as short as seconds or as long as 30 minutes) for project to “Deploy” &lt;/li&gt; &lt;li&gt;Once the “Deploy” step is done, you need to click on the “&lt;strong&gt;Run&lt;/strong&gt;” button to start your Azure “server” instance &lt;/li&gt; &lt;li&gt;Wait for an unknown length of time (could be seconds, could be much longer) for project to start &lt;/li&gt; &lt;li&gt;When project starts, you’ll see “WebRole” and a message indicating that the state is “&lt;strong&gt;Initializing&lt;/strong&gt;” &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Continue to wait&lt;/strong&gt; &lt;/li&gt; &lt;li&gt;When the state finally changes from “Initializing” to “&lt;strong&gt;Started&lt;/strong&gt;” (with a green icon), your Cloud Service site is ready for viewing &lt;/li&gt; &lt;li&gt;Click on the temporary staging link and see your project running live on the cloud! &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Assuming you’ve done everything correctly and you’ve patiently waited on all of Azure’s seemingly endless processes to complete the processing, you’ll have a site running live on the cloud with the RadControls for ASP.NET AJAX providing their familiar rich-UI.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW ‘BOUT THE GOTCHAS?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;There really aren’t any new gotchas here. The only thing that may surprise you is the waiting. You really do have to have some patience to deploy a project to Azure (at least during the CTP), so be prepared to wait for ten minutes or more for some Azure processes to finish. Otherwise, things are very straight forward. Visual Studio packages your files and configuration. Azure consumes those packages directly. You click buttons and your site runs (in theory).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;I NEED VISUAL PROOF&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;For those of you hoping to “see it to believe it,” I’ve got you covered. I have created two videos (so far) that cover both creating and deploying a simple “app” with the RadControls for ASP.NET AJAX to Azure. Both videos will be on &lt;a href="http://tv.telerik.com/"&gt;Telerik TV&lt;/a&gt; soon and I’ll be sure to add links to this post when they’re ready. Until then, have fun playing with Azure and don’t be afraid to use your RadControls for ASP.NET AJAX as you tackle the cloud!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/PrA7twjtoNk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/PrA7twjtoNk/deploying_radcontrols_to_azure.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-04-17/deploying_radcontrols_to_azure.aspx</comments>
      <guid isPermaLink="false">d25b55d5-e855-47b5-83b6-7cb6fbfc4bd0</guid>
      <pubDate>Fri, 17 Apr 2009 16:47:35 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-04-17/deploying_radcontrols_to_azure.aspx</feedburner:origLink></item>
    <item>
      <title>RadControls for ASP.NET AJAX on Azure (Part 1)</title>
      <description>&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px 10px; display: inline; border-top: 0px; border-right: 0px" title="telerikCloudReady" border="0" alt="telerikCloudReady" align="right" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-telerikCloudReady_2ebfe515-cba0-4c81-a173-f9a38c372add.sflb" width="213" height="255" /&gt; Those of you paying attention to “conference news” are probably aware of Microsoft’s entrance in to the cloud computing space via their platform code-named “&lt;a href="http://www.microsoft.com/azure/"&gt;Windows Azure&lt;/a&gt;.”&amp;#160; This version of “Windows in the cloud” essentially makes it possible to easily build and deploy .NET web applications to Microsoft’s hosted cloud infrastructure. The benefits of deploying your application to the cloud are (potentially) many, but I am going to assume you are already aware of the key “selling points” (such as scalability, scalability, and…oh yeah, scalability).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;TELERIK IS CLOUD READY&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I’m pleased to report that Telerik is “Cloud Ready.” This is a bit of a funny statement to make, but it is true. The humor is rooted in the fact that there is really nothing special about being “cloud ready.” You can use the exact same &lt;a href="http://www.telerik.com/aspnet-ajax"&gt;RadControls for ASP.NET AJAX&lt;/a&gt; that you know and love today to build applications for the cloud. In fact, the process for building your web applications is so familiar, it hardly needs any introduction. Deployment is a little different, but once you get the hang of it you’ll be able to rapidly build cloud applications with Telerik’s RadControls and have them running happily on the cloud with very little trouble.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW DO YOU GET STARTED?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Like I said, the process is very, very familiar if you’ve ever developed a web application in Visual Studio, but just to make sure there is no confusion, here’s what you need to do:&lt;/p&gt; &lt;ol style="list-style-type: decimal !important"&gt; &lt;li&gt;Install the &lt;a href="http://www.microsoft.com/azure/register.mspx"&gt;Azure SDK and VS Tools&lt;/a&gt; (in other words, get your environment setup) &lt;/li&gt; &lt;li&gt;In Visual Studio, navigate to &lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;New Project…&lt;/strong&gt; &amp;gt; &lt;strong&gt;Cloud Service&lt;/strong&gt; &amp;gt; &lt;strong&gt;Web Cloud Service&lt;/strong&gt; and create a new project &lt;/li&gt; &lt;li&gt;Once the project is created, you’ll see a web project with a Default.aspx. Edit this like you “normally” would with&amp;#160; an ASP.NET project, including dragging and dropping RadControls on the page. &lt;/li&gt; &lt;li&gt;Once you’re ready to test your site on the “Cloud Fabric,” simply press F5 and the Azure Tools for VS will automatically spin-up the local developer fabric (that simulates the cloud on your dev PC) and run your web app. &lt;/li&gt; &lt;li&gt;Rinse and repeat until you’re happy with your site. &lt;/li&gt; &lt;li&gt;Once happy, you’re ready to deploy to the “real” cloud fabric (more on this in the future) &lt;/li&gt; &lt;/ol&gt; &lt;p&gt;And that’s really all there is to it. In the near future, I’ll be composing some videos for Telerik TV showing you the RadControls running on Azure, but I wanted you to know you can start your tests today without any trouble. Unless…&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WINDOWS 7 GOTCHA&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If you’re like me, you’re exited about Windows 7 and you’re running it as your full-time OS. Unfortunately, Windows 7 &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/786d89ea-8ff6-49e9-bcad-a43c73ef0526/"&gt;currently has a bug&lt;/a&gt; that prevents Azure from working properly on your dev PC. Your solution? You only have two choices at this point in time:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Wait for the next build of Windows 7 (which will likely ship at TechEd next month), OR&lt;/li&gt; &lt;li&gt;Do your &lt;a href="http://blogs.msdn.com/davidlem/archive/2009/01/16/windows-azure-sdk-on-windows-7-beta.aspx"&gt;Azure development on a Windows Vista or Server 2008 VPC&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;It’s unfortunate that these two Microsoft beta/CTP tools don’t yet get along, but I suppose pre-release software can’t be perfect. Fortunately, your RadControls are ready to go, so give ‘em a try and enjoy developing applications for the cloud! Watch for more updates, demos, and videos soon.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/0wJCJPTvRGE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/0wJCJPTvRGE/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-04-13/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx</comments>
      <guid isPermaLink="false">e943c32a-8b65-4de7-af77-fe5409f0823a</guid>
      <pubDate>Mon, 13 Apr 2009 17:37:44 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-04-13/radcontrols_for_asp_net_ajax_on_azure_part_1.aspx</feedburner:origLink></item>
    <item>
      <title>Optimization Tip: RadCompression for ViewState</title>
      <description>&lt;p&gt;A few weeks ago, I showed you how you can use the new &lt;a href="http://blogs.telerik.com/toddanglin/posts/09-01-28/Optimization_Tips_RadCompression_Module.aspx"&gt;RadCompression HttpModule&lt;/a&gt; found in the RadControls for ASP.NET AJAX Q3 2008 SP2 (and later) to easily (as in, automatically) compress your Ajax and JSON web service communication. While that technique is great for improving the performance of modern web apps that do lots of processing client-side, that’s not the only thing RadCompression can do. It can &lt;em&gt;also&lt;/em&gt; automatically compress ViewState! This week, I’ll show you how you can quickly enable ViewState compression and show you the effects it has on overall ViewState size and server performance.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW DO I ENABLE VIEWSTATE COMPRESSION?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Enabling ViewState compression with the RadCompression module really couldn’t be easier. It requires no changes to your code, no changes to your markup, and not even a change to your web.config (assuming you’ve already added the required HttpModule references &lt;a href="http://blogs.telerik.com/toddanglin/posts/09-01-28/Optimization_Tips_RadCompression_Module.aspx"&gt;from the previous article&lt;/a&gt;). The only thing you need to do is add a new Browser file to your web project (or modify your Browser file if you’re already using one). To add a new Browser file, follow these simple steps:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Right-click on your web project, select &lt;strong&gt;“Add…” &amp;gt; “Add ASP.NET Folder…” &amp;gt; “App_Browsers”&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Right-click in your new App_Browsers folder, select &lt;strong&gt;“Add…” &amp;gt; “Add New Item…” &amp;gt; “Browser File”&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;The new browser file will have some default values, feel free to delete everything and then add this code:&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;XML (in your .browser file)&lt;/strong&gt;&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;browsers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;browser&lt;/span&gt; &lt;span style="color: #ff0000"&gt;refID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Default&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controlAdapters&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;adapter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;controlType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;System.Web.UI.Page&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;adapterType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Telerik.Web.UI.RadHiddenFieldPageStateCompression&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;&amp;lt;!--Uncomment the following line to use SessionStateCompression and remove ViewState from the page--&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;&amp;lt;!--&amp;lt;adapter controlType=&amp;quot;System.Web.UI.Page&amp;quot; adapterType=&amp;quot;Telerik.Web.UI.RadSessionPageStateCompression&amp;quot; /&amp;gt;--&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;controlAdapters&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;browser&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;browsers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;And that’s it! Really. Run your project at this point and you’ll discover that the RadCompression module is now automatically compressing your ViewState.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW MUCH DOES THE COMPRESSION HELP?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;ViewState, as you probably know, is just a serialized string of data. By default, it’s not compressed, it’s not encrypted, and it’s often a &lt;em&gt;bloated &lt;/em&gt;piece of string data that gets passed back and forth with every request to the server (even Ajax requests if you’re using UpdatePanels). Compressing this data is an easy way to reduce your page size and reduce the number of bytes you must send and receive from the server. &lt;/p&gt; &lt;p&gt;To demonstrate RadCompression’s effectiveness, I created a simple page with a RadGrid that loads data from the AdventureWorks Employees table. I bound my grid declaratively (which means &lt;em&gt;all bound data&lt;/em&gt; will end-up &lt;em&gt;in&lt;/em&gt; ViewState) to an EntityDataSource and I slowly started “cranking-up” my Grid’s page size- from 10 records to 240 per page. As I cranked-up page size, obviously my ViewState grew. I ran 7 tests with and without RadCompression and the results are below:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;RadCompression Efficiency&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="chartRadCompression_StateSize" border="0" alt="chartRadCompression_StateSize" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTipRadCompressionforViewStat_D28C-chartRadCompression_StateSize_8989ea61-b930-45c3-bd2b-8aba3c221027.sflb" width="450" height="289" /&gt; &lt;/p&gt; &lt;p&gt;The blue bars represent the ViewState size (in KB) &lt;em&gt;with&lt;/em&gt; RadCompression. The green bars represent the difference in the original ViewState size (i.e. total size with no compression). And the red numbers indicate the compression “efficiency” at each step (for instance, “53%” means the compressed ViewState was 53% smaller than the original). You should note a few things about this chart:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;As the original ViewState grew, the compression became even more “efficient” (ranging from 47% to 75% compression ratios)&lt;/li&gt; &lt;li&gt;In the first two tests, there was no difference between the original and the “compressed” output – more on this in a moment&lt;/li&gt; &lt;li&gt;&lt;strong&gt;On average, RadCompression reduced ViewState size by 61%!&lt;/strong&gt; (omitting the “0” tests)&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;So why are the first two tests “0%”? RadCompression actually has a “threshold” that must be passed before compression will kick-in. For smaller ViewState sizes, it doesn’t make sense to apply compression- the overhead of the processing and compression header/footer offset the small gains in overall state size. Currently, this threshold is 8KB. If your original ViewState is smaller than 8KB, RadCompression will automatically skip over it. Bigger than that, and RadCompression will automatically kick-in.&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT IS THE EFFECT ON SERVER PERFORMANCE?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Many people will often say, “Sure you can compress ViewState, but doesn’t that add significant processing overhead on the web server?” It is true that adding compression represents extra CPU cycles and it does have an effect on server performance. With RadCompression, though, that impact is relatively small. Internally, RadCompression uses Deflate compression to compress and decompress state, which is much faster than Gzip compression. And thanks to the optimizations of the compression APIs in .NET, the overall effect on server processing time is low.&lt;/p&gt; &lt;p&gt;To test this, I took our same test page and used a .NET Stopwatch (System.Diagnostics.Stopwatch) to test the time it took the server to process our page. I started the timer in OnPreInit and stopped it at the end of OnRender- a cycle the fully captures the loading and saving of ViewState. I then ran 6 tests and measured the server time (in milliseconds) with and without RadCompression enabled. For testing purposes, I chose to test the page configuration that had “70%” efficiency since this should represent a fairly large amount of compression work. Here are the results:&lt;/p&gt; &lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="chartRadCompression_ServerTime" border="0" alt="chartRadCompression_ServerTime" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTipRadCompressionforViewStat_D28C-chartRadCompression_ServerTime_ecc597d3-a159-4b74-b551-1052a8635073.sflb" width="450" height="267" /&gt; &lt;/p&gt; &lt;p&gt;The blue bars represent the original server time; the green represent the server time with compression enabled. (NOTE: This is not &lt;em&gt;page load&lt;/em&gt; time, which I often test in these Optimization Tips. This is strictly a measurement of the effect on server processing time.) What you can gather from this graph is that there is no clear disadvantage to using compression. Sometimes a page with compression processes &lt;em&gt;faster&lt;/em&gt; than a page without. Sometimes the reverse is true. When you crunch the numbers, compression turns-out to only impact server processing time by 10% on average. In absolute terms, we’re talking about &lt;strong&gt;a difference of 10 milliseconds&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;And remember, this is &lt;em&gt;server&lt;/em&gt; time. The page with compression- which has shaved ViewState size by 70%- should ultimately beat the original page’s overall load time because it has less data to send over the wire and less data for the browser to process. You will have to run your own tests to determine if the server cost is worth the savings in page state size for your site, but based on these tests, you are likely to come-out ahead with compression. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;TIP SUMMARY&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This may be one of the easiest ways to help reduce your page size, and in turn, help improve your page performance. By simply registering the RadCompression HttpModule and adding a .browser file to your project, you can see &lt;strong&gt;reductions of over 70% in your ViewState size&lt;/strong&gt; &lt;strong&gt;with little impact on your server performance&lt;/strong&gt;. Clearly, as developers we should all be taking active steps to reduce our ViewState size, but if you’ve already done everything you can (or at least everything you have time for) and you want to squeeze a few more KB out of your page, RadCompression is ready and waiting for you in your Telerik toolbox.&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/7AS57YI8YYc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/7AS57YI8YYc/optimization_tip_radcompression_for_viewstate.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-02-27/optimization_tip_radcompression_for_viewstate.aspx</comments>
      <guid isPermaLink="false">d7083231-a33b-46fa-a3dd-0fa7273319f4</guid>
      <pubDate>Fri, 27 Feb 2009 14:58:37 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-02-27/optimization_tip_radcompression_for_viewstate.aspx</feedburner:origLink></item>
    <item>
      <title>Handling OnAjaxRequest in Content Pages with Ajax Proxy</title>
      <description>&lt;p&gt;Here’s a quick tip for those of you using RadAjaxManager and RadAjaxManagerProxy. The scenario:&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;You have a MasterPage with a RadAjaxManager and a ContentPage with a RadAjaxManagerProxy (so far, so good, and &lt;a href="http://telerikwatch.com/2008/05/optimization-tips-using.html"&gt;you’re following Telerik’s best practice guidance&lt;/a&gt;). All declarative Ajax settings work fine with the Proxy- no trouble. But now you want fire an Ajax event on your ContentPage manually using JavaScript and handle the AjaxRequest event on the server. You’re shocked to discover there is no “AjaxRequest” event for the RadAjaxManagerProxy! What’s the solution?&lt;/p&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;Fortunately, the solution is easy. The RadAjaxManagerProxy is designed to make it easy to configure Ajax settings in complex MasterPage, ContentPage, and UserControl scenarios, but it doesn’t expose the events that the “parent” RadAjaxManager exposes. To use those events on a content page, you must simply get a reference to the parent RadAjaxManager (via a handy static helper method) and then setup your “manual” Ajax setting in code, like this:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;C# (in your ContentPage with the Proxy)&lt;/strong&gt;&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;//In your ContentPage OnPageLoad &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e) &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{ &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Get reference to AjaxManager (from Master) &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    var manager = RadAjaxManager.GetCurrent(&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;); &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Create a new delegate to handle the AjaxRequest event &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    manager.AjaxRequest += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; RadAjaxControl.AjaxRequestDelegate(YourContentPage_AjaxRequest); &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Add your ajax settings programmatically (with ref to Master manager) &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    manager.AjaxSettings.AddAjaxSetting(manager, &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.controlToUpdate); &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;} &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #008000"&gt;//Handle the Ajax event in your ContentPage code behind &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; YourContentPage_AjaxRequest(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, AjaxRequestEventArgs e) &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;{ &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Optionally process supplied event arg &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;switch&lt;/span&gt; (e.Argument) &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    { &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; &lt;span style="color: #006080"&gt;&amp;quot;SomeEventArgument&amp;quot;&lt;/span&gt;: &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Do something &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    } &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;} &lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;With this code in place, you can handle your OnAjaxRequest server-side event in your ContentPage code-behind when the Ajax event is execute from your JavaScript code, like this:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;JavaScript (in your ContentPage with Proxy)&lt;/strong&gt;&lt;/p&gt; &lt;div&gt; &lt;div style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; someJavaScriptFunction() { &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Get reference to RadAjaxManager on page &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (radManager == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;       radManager = $find(&lt;span style="color: #006080"&gt;'&amp;lt;%= RadAjaxManager.GetCurrent(this).ClientID %&amp;gt;'&lt;/span&gt;); &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt; &lt;span style="color: #008000"&gt;//Fire ajax request (optionally pass an event arg value) &lt;/span&gt;&lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;   radManager.ajaxRequest(&lt;span style="color: #006080"&gt;&amp;quot;SomeEventArgValue&amp;quot;&lt;/span&gt;); &lt;/pre&gt; &lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;} &lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Just that simple! The key to both the JavaScript and C# code is the static “&lt;strong&gt;RadAjaxManager.GetCurrent()&lt;/strong&gt;” method, which quickly gives you a reference to the “top level” RadAjaxManager in a ContentPage or UserControl. With that method in hand, you can easily tackle advanced scenarios with the RadAjaxManager and the Proxy control.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.telerik.com/help/aspnet-ajax/ajax-manager-proxy.html"&gt;Check out more, including how to handle OnRequestStart and OnRequestEnd client-side events on ContentPages, in the RadAjax docs&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/7iIh6IJ_LwM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/7iIh6IJ_LwM/handling_onajaxrequest_in_content_pages_with_ajax_proxy.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-02-25/handling_onajaxrequest_in_content_pages_with_ajax_proxy.aspx</comments>
      <guid isPermaLink="false">a00f84fe-5d96-4263-867f-46fa7432ebc3</guid>
      <pubDate>Wed, 25 Feb 2009 12:20:53 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-02-25/handling_onajaxrequest_in_content_pages_with_ajax_proxy.aspx</feedburner:origLink></item>
    <item>
      <title>Telerik on Windows 7 Beta &amp;ndash; The Complete Overview</title>
      <description>&lt;p&gt;For those of you that follow my &lt;a href="http://telerikwatch.com/2009/02/my-windows-7-beta-foray.html"&gt;TelerikWatch blog&lt;/a&gt;, you know that I recently made the jump to Windows 7 on my primary workstation (build 7000, to be exact). I’ve spent the weekend installing, tweaking, and testing the latest iteration of Windows, and &lt;a href="http://blogs.telerik.com/vassilpetev/posts/09-01-16/RadControls_for_WinForms_and_Windows_7_beta.aspx"&gt;like Vassil before me&lt;/a&gt;, my impressions are generally positive. Microsoft has definitely worked hard to ensure the compatibility nightmares of the XP to Vista jump are not repeated with Windows &lt;strike&gt;6.1&lt;/strike&gt; 7. I’m confident I’ll be able to use Windows 7- even in beta form- reliably as my full-time OS from this point forward.&lt;/p&gt; &lt;p&gt;As far as Telerik is concerned, all lights are green. I have successfully installed all of Telerik’s products on Windows 7:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;RadControls for ASP.NET AJAX (2008.3.1314) &lt;/li&gt; &lt;li&gt;RadControls for WinForms (2008.3.1321) &lt;/li&gt; &lt;li&gt;RadControls for WPF (2008.3.1217) &lt;/li&gt; &lt;li&gt;RadControls for Silverlight (2008.3.1217) &lt;/li&gt; &lt;li&gt;Telerik Reporting (2008.3.1402) &lt;/li&gt; &lt;li&gt;Telerik OpenAccess ORM (2008.3.1327.2) &lt;/li&gt; &lt;li&gt;Telerik WebUI Test Studio Beta &lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;p&gt;My environment is running VS 2008 SP1 and SQL Express 2008. All of the installers ran without error and behaved as expected. I did have some challenges running the installers at first, but a quick reboot of Windows 7 cleared the problem. If you have challenges with Windows 7 beta (really for installing anything), I suggest you first try re-running the installer as “admin” and then, if that fails, try rebooting and installing again. That’s worked for me for just about everything.&lt;/p&gt; &lt;p&gt;The ASP.NET AJAX, WinForms, WPF, Reporting, and OpenAccess installers all add their Visual Studio toolbox items and Visual Studio menus without problem. The OpenAccess and Telerik Reporting installers also installed their test databases (NorthwindOA and AdventureWorks, respectively) on SQL Express 2008 without problem.&lt;/p&gt; &lt;p&gt;The story carries over for design-time experience, too. The Telerik Reporting designer and wizards work without issue. The OpenAccess wizards and dialogs work without issue. And, of course, Telerik’s brand-new WebUI Test Studio test recorder and playback work. One important thing to remember is that you need to run Visual Studio as “admin” for all features to work. For instance, you may see a permissions error when trying to preview a Telerik Report in Visual Studio unless you are running as admin. Otherwise, no surprises.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Windows 7 beta is definitely not perfect- not yet- but it is very stable and very compatible with existing software. &lt;strong&gt;If you want to start working with Windows 7 beta, you will not experience any significant problems using it with Telerik’s tool.&lt;/strong&gt; You can confidently develop on Windows 7 beta with all of Telerik’s tools and you can confidently deploy applications &lt;em&gt;to&lt;/em&gt; Windows 7 beta built with Telerik’s components.&lt;/p&gt; &lt;p&gt;Don’t count our support as “official” yet- we’ll wait for Windows 7 release versions before dubbing our support official- but hopefully this overview will help you know what you can expect if you start working with Win7 early. And in short, you can expect good things when comes to Telerik and the Windows 7 beta.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/pwuA2to8S34" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/pwuA2to8S34/telerik_on_windows_7_beta_ndash_the_complete_overview.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-02-16/telerik_on_windows_7_beta_ndash_the_complete_overview.aspx</comments>
      <guid isPermaLink="false">9ec4a7ca-0d7d-4db2-a792-c2423285d104</guid>
      <pubDate>Mon, 16 Feb 2009 16:39:21 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-02-16/telerik_on_windows_7_beta_ndash_the_complete_overview.aspx</feedburner:origLink></item>
    <item>
      <title>The many localizations of RadEditor and RadSpell</title>
      <description>&lt;p&gt;Did you know that there over 25 localized versions of RadSpell's dictionaries (30, to be exact)? Did you know there are over 10 localizations of RadEditor? When you're building a global site, you often need to support a number of languages, and thanks to Telerik's outstanding community, we are able to offer a huge range of localizations for the RadControls- especially those controls which depend heavily on localized strings. Not all controls require localizations- a RadSlider or ColorPicker, for example, communicate their UI without any built-in strings. Even controls like RadGrid don't have much need for localization. Other controls- like RadEditor, RadSpell, and RadScheduler- have more built-in UI elements with string values and thus more need for broad localization support.&lt;/p&gt; &lt;p&gt;Officially, Telerik supports three languages:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;English (en-EN)&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;French (fr-FR)&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;German (de-DE)&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;There are Telerik provided localized versions of the RadEditor and RadSpell dialogs for these languages, plus RadSpell dictionaries. Telerik has a large (and active) developer community, though, and many of our customers have shared their localizations for the benefit of the entire community. While not "officially" support, these localizations are made available by Telerik so you have easy access to huge variety of languages. &lt;/p&gt; &lt;p&gt;Beyond the "official 3," Telerik has RadSpell dictionaries for an additional 27 languages:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Arabic (ar-AR)&lt;/li&gt; &lt;li&gt;Afrikaans (af-ZA)&lt;/li&gt; &lt;li&gt;Bulgarian (bg-BG)&lt;/li&gt; &lt;li&gt;Czech (cd-CZ)&lt;/li&gt; &lt;li&gt;Danish (da-DK)&lt;/li&gt; &lt;li&gt;German (Swiss) (de-CH)&lt;/li&gt; &lt;li&gt;Spanish (es-ES)&lt;/li&gt; &lt;li&gt;English (Australian) (en-AU)&lt;/li&gt; &lt;li&gt;English (British)&amp;nbsp; (en-GB)&lt;/li&gt; &lt;li&gt;English (Canadian) (en-CA)&lt;/li&gt; &lt;li&gt;Italian (it-IT)&lt;/li&gt; &lt;li&gt;Hebrew (he-IL)&lt;/li&gt; &lt;li&gt;French (Canadian) (fr-CA)&lt;/li&gt; &lt;li&gt;Hungarian (hu-HU)&lt;/li&gt; &lt;li&gt;Norwegian bokmål (nb-NO)&lt;/li&gt; &lt;li&gt;Norwegian nynorsk (nn-NO)&lt;/li&gt; &lt;li&gt;Dutch (nl-NL)&lt;/li&gt; &lt;li&gt;Polish (pl-PL)&lt;/li&gt; &lt;li&gt;Portuguese (pt-PT)&lt;/li&gt; &lt;li&gt;Portuguese (Brazil) (pt-BR)&lt;/li&gt; &lt;li&gt;Romanian (ro-RO)&lt;/li&gt; &lt;li&gt;Russian (ru-RU)&lt;/li&gt; &lt;li&gt;Ukrainian (uk-UA)&lt;/li&gt; &lt;li&gt;Slovak (sl-SK)&lt;/li&gt; &lt;li&gt;Swedish (sv-SE)&lt;/li&gt; &lt;li&gt;Slovenian (sl-SI)&lt;/li&gt; &lt;li&gt;Thai (th-TH)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;All localized dictionaries &lt;a href="http://www.telerik.com/community/forums/aspnet-ajax/spell/147971-radspell-dictionaries.aspx"&gt;are available on the Telerik forums&lt;/a&gt;. Of course, community submitted dictionaries may not be as complete as the Telerik provided dictionaries, but we hope that these resources help. For RadEditor, there are localized versions of the dialogs and toolbars in these 9 languages (beyond the "official 3"):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Danish (da-DK)&lt;/li&gt; &lt;li&gt;Dutch (nl-NL)&lt;/li&gt; &lt;li&gt;English (British)&lt;/li&gt; &lt;li&gt;Hebrew (he-IL)&lt;/li&gt; &lt;li&gt;Italian (it-IT)&lt;/li&gt; &lt;li&gt;Japanese (ja-JP)&lt;/li&gt; &lt;li&gt;Polish (pl-PL)&lt;/li&gt; &lt;li&gt;Portuguese (Brazil) (pt-BR)&lt;/li&gt; &lt;li&gt;Traditional Chinese (zh-DN)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;You can download these global resources &lt;a href="http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-for-asp-net-ajax-localizations.aspx"&gt;on the Telerik forums, too&lt;/a&gt;. In the same zip resources, you also find some "bonus" localizations. There are a few localizations for RadScheduler, RadUpload, and RadProgressArea in the following languages:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;English (British) - RadScheduler, RadSpell (dialogs), RadUpload, RadProgressArea&lt;/li&gt; &lt;li&gt;Hebrew - RadSpell (dialogs), RadUpload, RadProgressArea&lt;/li&gt; &lt;li&gt;Portuguese (Brazil) - RadScheduler, RadSpell (dialogs)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Hopefully these resources will come in handy for your global projects that use the RadControls. And if you've got a localization of the RadControls not listed here, why not share it with community! Send Telerik an email with your localizations and if we're able to use them, your efforts will be happily rewarded. 'Til next time, Goodbye! Auf Wiedersehen! Arrivederci! &lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/PDPj9aYGTKI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/PDPj9aYGTKI/the_many_localizations_of_radeditor_and_radspell.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-02-05/the_many_localizations_of_radeditor_and_radspell.aspx</comments>
      <guid isPermaLink="false">aca15c38-d81e-4384-a79b-8f01d8660922</guid>
      <pubDate>Thu, 05 Feb 2009 21:37:57 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-02-05/the_many_localizations_of_radeditor_and_radspell.aspx</feedburner:origLink></item>
    <item>
      <title>Optimization Tips: RadInput vs. RadInputManager</title>
      <description>&lt;p&gt;&lt;img border="0" alt="OptimizationTips" align="right" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTips_15087bef-de70-4c21-893d-0a01aab6d26c.sflb" width="280" height="249"&gt; In the Q3 2008 release, Telerik introduced a new control to the RadControls for ASP.NET AJAX suite called &lt;a href="http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/firstlook/defaultcs.aspx"&gt;RadInputManager&lt;/a&gt;. Like &lt;a href="http://demos.telerik.com/aspnet-ajax/input/examples/common/orderform/defaultcs.aspx"&gt;RadInput&lt;/a&gt;, it is designed to enable you to provided textboxes to your users that give real-time validation and feedback based on the entered text. The big difference with RadInputManager, though, is that you don't have to add lots of Telerik Input controls on your page to get this real-time feedback. Instead, you can quickly convert "standard" ASP.NET TextBoxes to RadInput textboxes via the RadInputManager configuration- similar to how you can use &lt;a href="http://telerikwatch.com/2008/05/optimization-tips-using.html"&gt;RadAjaxManager to quickly ajaxify&lt;/a&gt; your page without littering it with UpdatePanels.&lt;/p&gt; &lt;p&gt;RadInputManager is a very innovative control and- in my opinion- one of the biggest steps forward in simplifying ASP.NET form validation to come around in a long time. In this optimization tip, we'll take a look a the RadInputManager (RIM) control to see how it simplifies form validation and see how it helps us improve page performance.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;SIMPLIFYING FORM VALIDATION&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When ASP.NET developers want to validate form inputs today, that usually represents the beginning of a time consuming task where form validation controls are add to the page for every input that needs to be validated. After the assorted RequiredField, RegularExpression, and Range validators are added, their prosperities set, and some type of UI added to display their error messages, you're left with a page cluttered with markup that is unrelated to the actual layout or function of the form. Further, any complex validations on the page are usually set such that they do not get evaluated until the form has been submitted, meaning users get feedback regarding their input errors long after the mistake has been made. Not great for usability.&lt;/p&gt; &lt;p&gt;With RadInputManager that all changes. Instead, validating form inputs becomes easy and painless:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You add standard ASP.NET TextBoxes to your form where you want to collect values&lt;/li&gt; &lt;li&gt;You configure RadInputManager to apply RegularExpression, Numeric, DateTime, or RequiredField validations the appropriate textboxes&lt;/li&gt; &lt;li&gt;You run the page&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;No markup littering. No need to set properties over and over again on controls that are providing the same validation. And as a bonus, when you use RadInputManager, users get real-time feedback when their input does not validate, enabling them to correct it before submitting the form.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;RADINPUTMANAGER VALIDATION TYPES&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We won't go in to fully detailing the RadInputManager's properties- there are &lt;a href="http://www.telerik.com/help/aspnet-ajax/introduction_to_radinputmanager.html"&gt;great docs available for that&lt;/a&gt;- but I will highlight it's capabilities as a form input validation control. Via the control's simple configuration properties, you can accomplish any of these validations:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Numeric &lt;/strong&gt;- only accept numeric digits, specify Max and Min number range, specify negative number formatting, specify decimal formatting&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Date&lt;/strong&gt;- specify allowed DateTime format, specify allowed DateTime range&lt;/li&gt; &lt;li&gt;&lt;strong&gt;RegularExpression&lt;/strong&gt;- specify any regular expression to validate&lt;/li&gt; &lt;li&gt;&lt;strong&gt;TextBox&lt;/strong&gt;- use as simple RequireField validator&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In addition to these specific validation types, RadInputManager allows you make any textbox required (essentially replacing the need for separate required field validators) and it enables any textbox's validation to be declaratively connected to a web service for powerful server-side validation. With a single control, you're replacing the need for separate TypeValidators, RangeValidators, RequiredFieldValidators, and CustomValidators for &lt;em&gt;every&lt;/em&gt; input on your form.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;RADINPUT VS. RADINPUTMANAGER&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;RadInput has been part of the Telerik RadControls for quite some time and- like the RadInputManager- it provides rich, validated text input. In fact, the RadInputManager is really just simplifying and optimizing the creation of RadInput controls on your page. Rather than manually adding a RadInput every place you need input validation and then initializing all of those controls separately, RadInputManager allows you to simplify the the configuration and optimize the initialization on the client. For example, if you needed to validate 5 numeric textboxes on a form, you might do this with RadInput:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;ASPX&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadNumericTextBox1"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadNumericTextBox2"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadNumericTextBox3"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadNumericTextBox4"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadNumericTextBox5"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadNumericTextBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;br&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Notice the duplication of properties we have to set for each control. Also note that if we want to change the validation in the future, we have to replace the entire input control. With RadInputManager, the same configuration might look like this:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;ASPX&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadInputManager&lt;/span&gt; &lt;span style="color: #ff0000"&gt;runat&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="server"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="radInputManager1"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:NumericTextBoxSetting&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MaxValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;MinValue&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Validation&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsRequired&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TargetControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:TargetInput&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ControlID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextBox1"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:TargetInput&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ControlID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextBox2"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:TargetInput&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ControlID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextBox3"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:TargetInput&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ControlID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextBox4"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:TargetInput&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ControlID&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextBox5"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;TargetControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:NumericTextBoxSetting&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;telerik:RadInputManager&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Where in the above code snippet I have "TextBox1" through 5 somewhere on my form. Now I'm only setting my validation rules once, and I even have the ability set the "IsRequired" flag (something not available with RadInput). If I need to change the validation of a TextBox in the future, it's a simple matter of defining a new "Validation Setting" in my RadInputManager and adding the TextBox to its "TargetControls" collection.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;IMPACT ON PERFORMANCE&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When you use RadInputManager instead of RadInput, you're optimizing your page in two ways: &lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) You're reducing the bytes sent over the wire&lt;br&gt;2) You're reducing the page initialization time&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;To observe this, we'll create a simple test that is made-up of two pages: one page has 40 RadInput controls (10 of each flavor, Numeric, DateInput, MaskedTextBox, and TextBox) and the other 40 standard TextBox controls with RadInputManager (configured with 10 controls for each setting type, Numeric, Date, RegEx, and TextBox). We'll load both of these pages in FireFox six times (on an empty cache each time) and measure total bytes received, JavaScript bytes received, HTML bytes received, requests, and average page load time. We'll then compare the numbers to see the &lt;em&gt;relative&lt;/em&gt; difference (not absolute, since absolute times are impacted by many factors) RadInputManager has on page performance.&lt;/p&gt; &lt;p&gt;As a follow-up, we'll also re-run the tests- both with RadInput and RadInputManager- with &lt;a href="http://telerikwatch.com/2008/04/optimization-tipsthe-rad-managers-for.html"&gt;the RadManagers&lt;/a&gt; to see how they affect overall page performance.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Bytes Over the Wire&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;img border="0" alt="radInputMngr_Chart_Bytes" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-radInputMngr_Chart_Bytes_b49253e9-7b55-421c-af74-80eacbd19d6a.sflb" width="468" height="276"&gt; &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This chart shows us the difference in bytes sent over the wire when using RadInput vs. RadInputManager for the exact same scenario (40 inputs). I did not include the results of the tests with the RadManagers because they do not significantly effect the bytes sent to the client (in this test, they only reduced total bytes by about 1%). What we see right away is that RadInputManager reduces the total bytes sent to the client by about 22%, but it sends about 5% more JavaScript to the client than RadInput. To achieve he overall reduction, RadInputManager is sending much less HTML- about 55% less in these tests. That's significant for one very important reason:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;When a page is requested, all page resources (like JavaScript) will be cached and the cached versions will be used on subsequent page loads. The HTML, however, will be requested and sent every time the page loads.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;So while RadInputManager does send slightly more JavaScript, those resource gets cached on the initial page request and then the lightweight HTML gets exchanged after that. With RadInput, you're passing twice as much HTML for every page request.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Average Page Load Time&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="radInputMngr_Chart_time" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-radInputMngr_Chart_time_3450cf3b-d7c9-486c-9983-2b7f925deb14.sflb" width="469" height="276"&gt; &lt;/p&gt; &lt;p&gt;When it comes to page load time, we also see a significant gain in performance with RadInputManager. Since the Manager can coordinate the initialization of the validation logic (as opposed to having 40 separate controls trying to initialize on page load with RadInput), overall page load time can be reduced. In these tests, the page with RadInputManager took an average of 23% less time to load than the page with RadInput controls. Page load performance was even better when the RadManagers (RadScriptManager and RadStyleSheetManager, for the unfamiliar) were added, extending RadInputManager's benefit to about 27% less loading time while cutting total requests in half (from 11 to 5).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;OPTIMIZATION TIP SUMMARY&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;RadInput and RadInputManager are two very capable input validation controls. Both have features that make them compelling- such as RadInput's support for numeric "spinners" and RadInputManager's support for RequiredFields- so it's important to pick the right control when designing your pages. For richer UI with more interactive controls, RadInput is currently your best choice. For top performance and highly optimized pages, RadInputManager is the best choice for a few simple reasons:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;It reduces the bytes sent over the wire and has a better caching story&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;It is much faster to configure than RadInput or traditional ASP.NET validation controls&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;It improves overall page load performance&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Hopefully the evidence presented in this article will help you understand the benefit of using RadInputManager in your own projects and show you yet another way Telerik is trying to deliver more than expected when it comes to helping you optimize your web applications.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/JRh10Bs0vZc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/JRh10Bs0vZc/optimization_tips_radinput_vs_radinputmanager.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-01-29/optimization_tips_radinput_vs_radinputmanager.aspx</comments>
      <guid isPermaLink="false">6d7920a1-6f12-4711-8d12-b9db1e0cfd0a</guid>
      <pubDate>Thu, 29 Jan 2009 15:04:00 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-01-29/optimization_tips_radinput_vs_radinputmanager.aspx</feedburner:origLink></item>
    <item>
      <title>Optimization Tips: RadCompression Module</title>
      <description>&lt;p&gt;&lt;img border="0" alt="Optimization Tips" align="right" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTipsRadCompressionModule_C989-OptimizationTips_63d0ad09-fa26-45e1-99fb-cb88044448ac.sflb" width="280" height="249"&gt; Welcome back to the ongoing Optimization Tips series. It's been a while since the last installment, so it's high-time we took a look at more tips and tricks for optimizing your Telerik-powered web applications. In this the seventh article in this series, we'll take a look at Telerik's brand new &lt;a href="http://demos.telerik.com/TelerikCompressionModule/Default.aspx"&gt;RadCompression HttpModule&lt;/a&gt; and try to gain a deep understanding of how this tool can help improve application performance. Some of the concepts in this article build on things we've discussed in previous installments, so I encourage you &lt;a href="http://telerikwatch.com/search/label/Optimization%20Tips"&gt;to read the earlier articles&lt;/a&gt; before reading this if you have not already done so. Let's get started.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT IS RADCOMPRESSION?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Simply put, RadCompression is a HttpModule that ships with the RadControls for ASP.NET AJAX (Q3 2008 SP2 and later) that is designed to &lt;em&gt;automatically&lt;/em&gt; compress your AJAX and Web Service responses. In other words, RadCompression will intercept the bits that your server is sending back to a browser (or Silverlight-client, for that matter) and compress them. Once the compressed bits reach the browser, standard browser technology takes-over and decompresses the response so your application can work with it normally. The compression process is completely transparent to your client-side code (JavaScript or Silverlight) and your server-side code. It simply reduces the number of bits that must be sent over the wire (from your server to your client) and thus- in theory- improves your page performance by reducing the TTLB (time to last byte).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT RADCOMPRESSION IS&lt;em&gt; NOT&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;RadCompression is &lt;em&gt;not&lt;/em&gt; designed to be a complete replacement for other HTTP compression tools, such as the built-in HTTP Compression in IIS 7. Instead, it is designed to work with those existing tools to cover scenarios they usually miss- namely the compression of bits moving back and forth in AJAX (and now Silverlight) applications. If you have HTTP Compression enabled in IIS7, you'll discover that it &lt;em&gt;does not&lt;/em&gt; compress your AJAX and Web Service responses; it only compresses the initial bits sent to the browser when the page is requested. By adding RadCompression to your project, you cover those gaps and start compressing your XHR (XmlHttpRequest - i.e. the "X" in AJAX).&lt;/p&gt; &lt;p&gt;So, if RadCompression does not cover all HTTP traffic, what does it cover? Quite simply, RadCompression will automatically detect and compress requests that expect these content response types (as found in the HTTP request's "ContentType" header or "AcceptsTypes" header):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;application/x-www-form-urlencoded  &lt;li&gt;application/json  &lt;li&gt;application/xml  &lt;li&gt;application/atom+xml&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;These types generally reflect the content types returned by AJAX Web Services, ADO.NET Data Services, and AJAX UpdatePanel responses, though there certainly are other scenarios that return these content types (such as a typical RSS feed). If a browser supports compression (and most modern browsers do), and RadCompression is enabled, all content of this type will be compressed. The one exception is IE6, which does not well support this compression, so RadCompression will automatically ignore requests coming from IE6 clients.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HOW DO YOU ENABLE RADCOMPRESSION?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Enabling RadCompression really couldn't be easier. It's a simple matter of adding a HttpModule registration to your site's web.config. Specifically, you need the following:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;XML (Web.Config)&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;httpModules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  ...
  &lt;span style="color: #008000"&gt;&amp;lt;!-- Add this line exactly as is - the name value is important --&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadCompression"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Telerik.Web.UI.RadCompression"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;httpModules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #008000"&gt;&amp;lt;!-- If you're using IIS7, then add this, too--&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;system.webServer&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;modules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
      ...
      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="RadCompression"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Telerik.Web.UI.RadCompression"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;modules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
...&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;With that single line of configuration (or two lines if you're using IIS7 Integrated Pipeline), RadCompression is ready to work. You don't need to make any additional code or configuration changes. The compression module will automatically look for content that matches the conditions mentioned above and compress it. Remember that HttpModules, unlike HttpHandlers, touch &lt;em&gt;every&lt;/em&gt; request processed by ASP.NET, so you don't have to do anything to your pages or services to make the compression work. All compression is handled by the module. All decompression is handled by the browser.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WHAT IS THE BENEFIT?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Time to get down to the brass tacks. Does RadCompression really help improve your application's performance? As you know, in the Optimization Series, we've been testing different optimization techniques and their effect on page load time. It's crude, but it gives you a &lt;em&gt;relative&lt;/em&gt; idea of how the technique can improve your application's performance. For RadCompression, I ran eight unique tests, executing each six times to collect a reliable sample set. The tests are composed of two distinct scenarios:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1) UpdatePanel Updates:&lt;/strong&gt; In this scenario, there is a page with a RadGrid, bound server-side during the NeedsDataSource RadGrid event, with a RadAjaxManager on the page to "ajaxify" all Grid operations.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2) Client-binding Updates:&lt;/strong&gt; In this scenario, there is a page with a RadGrid that is declaratively bound to a ADO.NET Data Service (which, for the unfamiliar, is essentially a fancy WCF web service). The RadGrid fetches data via the service and initializes in the browser and uses the web service for all operations, such as paging.&lt;/p&gt; &lt;p&gt;For both scenarios, the data layer is a simple LinqToSql model using the AdventureWorks database. Both grids are bound to all Employees in the AdventureWorks data store, so the scenarios should be equal except for the way they handle initial data binding and binding for operations like paging. For each scenario, we'll test the following, measuring bytes sent during the request, bytes sent in the response, total requests, and page load time:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Initial page load 
&lt;li&gt;Paging the RadGrid with RadCompression &lt;em&gt;disabled&lt;/em&gt; &lt;li&gt;Paging the RadGrid with RadCompression &lt;em&gt;enabled&lt;/em&gt; &lt;li&gt;Loading and paging the RadGrid with RadCompression + &lt;a href="http://telerikwatch.com/2008/04/optimization-tipsthe-rad-managers-for.html"&gt;the RadManagers&lt;/a&gt; (RadScriptManager, RadStyleSheetManager)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;These tests will show us the relative impact of adding RadCompression to a site. Let's take a look at the results:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Average Bytes Received&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="Bytes Received" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTipsRadCompressionModule_C989-radCompress_Chart_bytesRcvd_da36e318-2358-4584-936d-2b08a50aa505_1.sflb" width="614" height="310"&gt; &lt;/p&gt; &lt;p&gt;This chart reveals some interesting facts. First, we see that choosing to use UpdatePanels (and server-side binding) or client-side binding does &lt;em&gt;not&lt;/em&gt; significantly initial page load size. In fact, it takes a few more bytes to start with client-side binding (though we see when the RadManagers are used those bytes compress better). The real benefit of the client-side binding is revealed in the RadGrid paging operations, where the bytes received are reduced by 62% (on average). When we add the RadCompression HttpModule, we see improvement in both scenarios paging scenarios. With UpdatePanels and "traditional" AJAX, bytes sent over the wire are reduced by about 68% with RadCompression enabled, and by about 86% with client-side binding. So right away we see that RadCompression has a significant impact on reducing traffic for async operations like paging in RadGrid.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Average Page Load Time&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img border="0" alt="radCompress_Chart_loadTime" src="http://blogs.telerik.com/Libraries/MetaBlogLib/WindowsLiveWriter-OptimizationTipsRadCompressionModule_C989-radCompress_Chart_loadTime_f75c6e32-99a6-4193-ab37-b89cce6488b7_1.sflb" width="546" height="305"&gt; &lt;/p&gt; &lt;p&gt;The load time results can be a bit confusing at first. They are not nearly as dramatic as the reduction in bytes received, so you have to look close to understand what's happening. First of all, we can see that all operations- including the initial page load- are happening in less than one second. In fact, all of the paging operations are happening in about 1/10 of one second! That means the localhost environment makes it hard to see the impact of the compressed bytes on page load time while paging a RadGrid. You can see, of course, that the RadManagers help reduce the initial page load time by about 25%, but the RadCompression module has a negligible impact on the RadGrid &lt;em&gt;paging&lt;/em&gt; load time. The take away: for sites deployed to a local network (i.e. intranet sites), you really don't need to worry about performance optimizations at the level RadCompression provides. The latency is low enough and the bandwidth high-enough that you won't see a significant impact on page load performance. For &lt;em&gt;remote&lt;/em&gt; sites, though, the delta between load time with and without RadCompression should be much more obvious (thanks to the time required to transfer 75% more bytes over the wire).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;OPTIMIZATION TIP SUMMARY&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When it comes to RadCompression, the impact it has on your site just depends on where your users are located. If you have a site that is deployed over the web, where latency and connection speeds are unpredictable, reducing the bytes you send over the wire is an easy way to improve your site's performance. And since RadCompression can literally be implemented with a single change to your config file, you really don't have much to lose. In a quick word:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;RadCompression is an easy way to reduce the bytes sent over the wire for XHR operations. &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Hopefully you'll enjoy this new tool in your Telerik toolbox. Whether you use them or not, Telerik is working hard to give you all of the tools you need to optimize your websites with very little work. When combined correctly for the right sites, we believe we can enable you to not only to build sites quickly, but with &lt;em&gt;measurable &lt;/em&gt;top performance.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/Y53FfU7TfmE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/Y53FfU7TfmE/optimization_tips_radcompression_module.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-01-28/optimization_tips_radcompression_module.aspx</comments>
      <guid isPermaLink="false">86e1f3f9-ea9a-453b-9088-f4b2df489738</guid>
      <pubDate>Wed, 28 Jan 2009 17:19:39 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-01-28/optimization_tips_radcompression_module.aspx</feedburner:origLink></item>
    <item>
      <title>Simplifying OpenAccess Scope in ASP.NET with HttpModule</title>
      <description>&lt;p&gt;Whenever you start working with a modern ORM tool, one of the biggest challenges is figuring out how to manage the "scope" (or sometimes called "context" or "data context"). It is this transactional space where the ORM tool keeps track of changes being made to "persistent objects" in your application so that they can be saved to your "persistence layer" (usually a database) when you're ready to commit them. But figuring out when to create a scope, when to close it, and all the annoying problems that result from closing a scope too early can be very frustrating, and they often are what drive people back to the "raw" ADO.NET they know.&lt;/p&gt; &lt;p&gt;So let's simplify that process for OpenAccess. I'll show you how you can use a HttpModule to automate the management of your OpenAccess scope in ASP.NET applications.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;SCOPE &amp;lt;&amp;gt; DATABASE CONNECTION&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If you remember one thing, remember this: &lt;strong&gt;an open scope does not equal an open connection to your database&lt;/strong&gt;. It was this fact that really helped the proverbial light bulb go-off inside my head when it comes to understanding scope management. The scope is an in-memory object related to tracking changes you're making to your persistent objects. Leaving a scope "open" for the duration of a HTTP Request is &lt;em&gt;not&lt;/em&gt; going to leave a connection to your database open for the same period of time. Rather, a scope will automatically open- and then quickly close- connections to your database when operations requiring interaction with the persistence layer are executed.&lt;/p&gt; &lt;p&gt;That means it is okay to create a scope at the beginning of a request, and then dispose of it at the end of a request. In fact, doing so will help us avoid a lot of errors that can creep in to a ASP.NET project when scope is closed early (like the dreaded "IObjectScope is already closed" errors).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HTTPMODULE FOR SCOPE&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;What programming mechanism does ASP.NET provide for interacting with every HTTP request? The HttpModule (HttpHandlers only respond to requests with specific extensions, making Modules the better choice here). The basic approach to our module is this:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;On request start, create a new ObjectScope and store it in Session&lt;/li&gt; &lt;li&gt;Use stored Scope in application code (accessing from Session)&lt;/li&gt; &lt;li&gt;On request end, close and dispose ObjectScope&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;That sounds easy enough. There is a catch, though. Session is not available in the HttpModule BeginRequest event (it's null). So how then will we store our new Scope in Session? We'll use the less known PreRequestHandlerExecute and PostRequestHandlerExecute events, which fire just before and just after the page event handlers are executed. To use the events, we'll wire them up in our Init method:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Init(HttpApplication context)
{
    &lt;span style="color: #008000"&gt;//Wire-up Pre and Post RequestHandlers&lt;/span&gt;
    context.PreRequestHandlerExecute += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EventHandler(context_PreRequestHandlerExecute);
    context.PostRequestHandlerExecute += &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EventHandler(context_PostRequestHandlerExecute);
    
    &lt;span style="color: #008000"&gt;//Get the defined session "keys" from the Web.Config&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; key = ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessScopeKey"&lt;/span&gt;];
    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; transKey = ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessTransactionKey"&lt;/span&gt;];
    &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; commKey = ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessCommittableKey"&lt;/span&gt;];

    &lt;span style="color: #008000"&gt;//Use the keys from Web.Config, or if null, use default values&lt;/span&gt;
    SCOPE_KEY = key ?? &lt;span style="color: #006080"&gt;"objectScope"&lt;/span&gt;;
    TRANSACTION_KEY = transKey ?? &lt;span style="color: #006080"&gt;"transactionScope"&lt;/span&gt;;
    COMMITTABLE_KEY = commKey ?? &lt;span style="color: #006080"&gt;"committableKey"&lt;/span&gt;;
}&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;In addition to wiring-up our events, we also grab a few values from our web.config that will be used to store our scope in Session. This config-based keys approach makes it easy to use the same key in both our HttpModule and our application code and reduces the "brittleness" of the code that would be introduced by hard-coded values.&lt;/p&gt; &lt;p&gt;Next, we need to actually write code for the Pre and PostExecuteHandler events. In these events, we need to create and dispose our scope, respectively. The code we need is pretty simple:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; context_PreRequestHandlerExecute(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)
{
    &lt;span style="color: #008000"&gt;//Verify that the HttpContext Session is not null&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (HttpContext.Current.Session != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
    {
        &lt;span style="color: #008000"&gt;//Create a new object scope and save it in Session&lt;/span&gt;
        HttpContext.Current.Session[SCOPE_KEY] = ObjectScopeProvider1.GetNewObjectScope();

        &lt;span style="color: #008000"&gt;//Create new transaction for the scope&lt;/span&gt;
        CreateTransaction();
    }
}

&lt;span style="color: #0000ff"&gt;void&lt;/span&gt; context_PostRequestHandlerExecute(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, EventArgs e)
{
    &lt;span style="color: #008000"&gt;//Verify the HttpContext Session is not null&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (HttpContext.Current.Session != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
    {
        &lt;span style="color: #008000"&gt;//TEST HELPER: Use this setting to make all transactions rollback&lt;/span&gt; &lt;span style="color: #008000"&gt;//thus preventing any data from changing in the DB&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessRollbackAll"&lt;/span&gt;] != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp;
            ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessRollbackAll"&lt;/span&gt;] == &lt;span style="color: #006080"&gt;"true"&lt;/span&gt;)
            RollbackTransaction();
        &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;
            CommitOpenAccessTransaction(); &lt;span style="color: #008000"&gt;//Commit the open transaction&lt;/span&gt;

        ObjectScopeProvider1.Database().Properties.TransactionProvider = TransactionProvider.OpenAccess;
        &lt;span style="color: #008000"&gt;//Dispose the open Transaction object&lt;/span&gt;
        DisposeTransaction();

        &lt;span style="color: #008000"&gt;//Clear session variables (remove items from session)&lt;/span&gt;
        ClearSessionValues();
    }
}&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As you can see, when the request starts, we're simply using the ObjectScopeProvider class (a class provided automatically by the OpenAccess wizards in Visual Studio) to create a new ObjectScope and then we save it in Session. At the end of the request, we commit any open transactions (unless we're in "test rollback" mode), dispose our scope and transaction objects, and then remove all values from Session. Now, when we want to write code in our application, we can simply use the Scope stored in session and not have to worry about opening or closing a scope manually in our application code. In fact, we can even improve the ObjectScopeProvider class in our web projects to look for an existing scope in Session automatically, like so:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;C#&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; IObjectScope ObjectScope()
{
    &lt;span style="color: #008000"&gt;//If Scope found in session, cast and return it&lt;/span&gt; &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (HttpContext.Current.Session != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; HttpContext.Current.Session[ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessScopeKey"&lt;/span&gt;]] != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (IObjectScope)HttpContext.Current.Session[ConfigurationManager.AppSettings[&lt;span style="color: #006080"&gt;"OpenAccessScopeKey"&lt;/span&gt;]];

    &lt;span style="color: #008000"&gt;//If no scope found in session, return new Scope&lt;/span&gt;
    Database();

    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt;( theObjectScopeProvider1.myScope == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; )
        theObjectScopeProvider1.myScope = GetNewObjectScope();

    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; theObjectScopeProvider1.myScope;
}&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;ISN'T SESSION A BAD THING&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Normally, and in many cases, yes, especially when you're faced with taking an application in to a multi-server environment. But in this case, since we're only using session for the duration of a single request, we're not faced with the same problems. We add our Scope to Session on the start of a request, use it for all OpenAccess processing in that request, and then close it and remove it from Session when the request is done. That means we don't care if the next request goes to a different server, because the process will start over and a new Scope will be created and destroyed. &lt;/p&gt; &lt;p&gt;Could you leave your Scope open longer than a single request? In theory, yes, but that does introduce some rather tricky scenarios that you'd have to handle in your application, such as how to handle "orphaned" Scopes that do not get closed by some application event. So for web applications, opening and closing a Scope once per request is usually the safest and easiest to manage approach.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;And that's all there is to it. I'm attaching to this post a sample C# project that contains my implementation of the OpenAccess HttpModule for managing Scope. To use it, simply add the project to your solution, and then reference it in your OpenAccess-enabled web project. Don't forget to register the HttpModule in your web.config, too:&lt;/p&gt; &lt;p&gt;&lt;strong&gt;XML (Web.Config)&lt;/strong&gt;&lt;/p&gt; &lt;div&gt;&lt;pre style="border-bottom-style: none; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: consolas, 'Courier New', courier, monospace; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;httpModules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  ...
  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="OpenAccessScopeModule"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TelerikOpenAccess.Data.Module.ScopeHelper, TelerikOpenAccess.Data.Module"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
  ...
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;httpMoules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Hopefully this will help simplify your OpenAccess web projects and help make the process of managing Scope almost invisible. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.telerik.com/Libraries/Todd_Anglin/OpenAccessHttpModule.sflb"&gt;Download OpenAccess Scope HttpModule&lt;/a&gt; (VS 2008 C#)&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ToddAnglinOnTelerik/~4/PZBWQIwqGjs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/ToddAnglinOnTelerik/~3/PZBWQIwqGjs/simplifying_openaccess_scope_in_asp_net_with_httpmodule.aspx</link>
      <author>Todd Anglin</author>
      <comments>http://blogs.telerik.com/toddanglin/posts/09-01-20/simplifying_openaccess_scope_in_asp_net_with_httpmodule.aspx</comments>
      <guid isPermaLink="false">bb4fc7d8-0d1e-46fb-9220-ccca8d2ba30b</guid>
      <pubDate>Tue, 20 Jan 2009 17:11:27 GMT</pubDate>
    <feedburner:origLink>http://blogs.telerik.com/toddanglin/posts/09-01-20/simplifying_openaccess_scope_in_asp_net_with_httpmodule.aspx</feedburner:origLink></item>
  </channel>
</rss>
