<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://aspadvice.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Jeff Cranford's Blog</title><link>http://aspadvice.com/blogs/jeffc/default.aspx</link><description>Too busy writing code to think of a clever saying...</description><dc:language>en</dc:language><generator>CommunityServer 2.1 (Build: 60809.935)</generator><item><title>Disasters caused by programming errors.</title><link>http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx</link><pubDate>Mon, 05 Jun 2006 16:59:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:18395</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/18395.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=18395</wfw:commentRss><description>&lt;P&gt;Haven't seen this anywhere else....&lt;/P&gt;
&lt;P&gt;This is a list of programming errors which ended up causing fairly major disasters (loss of life, billion dollar losses, etc) including an in-depth description of the cause of the error. Puts those "returned licences" that&amp;nbsp;periodically (albeit rarely ;)&amp;nbsp;) &amp;nbsp;result from my errors in perspective.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.ima.umn.edu/~arnold/disasters/disasters.html"&gt;http://www.ima.umn.edu/~arnold/disasters/disasters.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and more here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www5.in.tum.de/~huckle/bugse.html"&gt;http://www5.in.tum.de/~huckle/bugse.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;;subject=Disasters+caused+by+programming+errors." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;;title=Disasters+caused+by+programming+errors." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;title=Disasters+caused+by+programming+errors." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;;title=Disasters+caused+by+programming+errors." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx&amp;amp;;title=Disasters+caused+by+programming+errors.&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/06/05/18395.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=18395" width="1" height="1"&gt;</description></item><item><title>Great 'retro' web interface.</title><link>http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx</link><pubDate>Wed, 22 Mar 2006 13:32:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:15904</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/15904.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=15904</wfw:commentRss><description>&lt;P&gt;I recently checked out the website for The Raconteurs (a "supergroup" made up of Jack White, Brendon Benson, and two other guys), and they've done their website up in old school terminal style interface (in Flash) complete with keyboard navigation. I like it!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.theraconteurs.com/"&gt;http://www.theraconteurs.com/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;;subject=Great+%27retro%27+web+interface." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;;title=Great+%27retro%27+web+interface." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;title=Great+%27retro%27+web+interface." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;;title=Great+%27retro%27+web+interface." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx&amp;amp;;title=Great+%27retro%27+web+interface.&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/22/15904.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=15904" width="1" height="1"&gt;</description></item><item><title>Web 2.0 people...don't forget your Ajax prehistory!!!</title><link>http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx</link><pubDate>Tue, 07 Mar 2006 17:10:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:15619</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/15619.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=15619</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;In a short time, Ajax has gone from a little known technology to a full-blown Internet phenomenon. In fact, the term "Ajax" has become so ubiquitous that it has all but encompassed the predecessors to which Ajax owes it's existance.&amp;nbsp;I felt it was important to document the people who carried the torch through the dark ages of callback technology....way back in the day when "Ajax" was known as "remote scripting" and&amp;nbsp;before the XmlHttp object was available in most browsers (forcing callback enthusiasts had to make due with Applet and hidden IFRAME callbacks) .&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Microsoft Remote Scripting for ASP (yes, I already have &lt;a href="http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;waxed poetic&lt;/A&gt; about Microsoft's place in Ajax history)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;Brent Ashley's JSRS (&lt;A href="http://www.ashleyit.com/rs/main.htm"&gt;http://www.ashleyit.com/rs/main.htm&lt;/A&gt;). Quite possibly the most important pre-Ajax callback site. &lt;/FONT&gt;&lt;/P&gt;
&lt;LI&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;Thycotic Remote Scripting library (&lt;A href="http://www.thycotic.com/dotnet_remotescripting_client.html"&gt;http://www.thycotic.com/dotnet_remotescripting_client.html&lt;/A&gt;). Based on Brent Ashley's work, and the first non-MS&amp;nbsp;attempt at a server library to manage "callbacks/remote scripting/Ajax/insert your buzzword here".&lt;/FONT&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;If I've forgotten anyone (which I'm sure is quite possible), please let me know.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;And, not to be too self serving (well...ok...maybe a little self-serving), the "Ajax" library I wrote (&lt;A href="http://www.dart.com/powerweb/livecontrols.aspx"&gt;PowerWEB LiveControls for ASP.NET&lt;/A&gt;) predated "Ajax" by 6 months.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;;subject=Web+2.0+people...don%27t+forget+your+Ajax+prehistory!!!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;;title=Web+2.0+people...don%27t+forget+your+Ajax+prehistory!!!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;title=Web+2.0+people...don%27t+forget+your+Ajax+prehistory!!!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;;title=Web+2.0+people...don%27t+forget+your+Ajax+prehistory!!!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx&amp;amp;;title=Web+2.0+people...don%27t+forget+your+Ajax+prehistory!!!&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2006/03/07/15619.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=15619" width="1" height="1"&gt;</description></item><item><title>Google Base and hypocricy</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx</link><pubDate>Thu, 17 Nov 2005 15:50:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:13862</guid><dc:creator>jeffc</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/13862.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=13862</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;Ok, I realize this is my second straight blog about the unfair treatment Microsoft receives from the media &amp;amp; public.&amp;nbsp; However, I feel compelled to point out the hypocricy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Recently, Google Base (a free&amp;nbsp;ad posting service) went public, and in doing so, continued their recent trend of abusing "standards" that Microsoft has traditionally been accused of violating, but without the usual backlash Microsoft receives.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;"Borrowing" ideas pioneered by other companies (since 1995,&amp;nbsp;craigslist.org has gained a large following pushing forward a "grass roots" approach to web sales, marketing, and communication)&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;Using their dominance of the market to crush smaller, weaker competition&amp;nbsp;(good luck&amp;nbsp;craigslist)&amp;nbsp;&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Arial size=2&gt;&lt;a href="http://aspadvice.com/blogs/rbirkby/archive/2005/11/16/13833.aspx"&gt;Changing standards &lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Yeah, before you&amp;nbsp;ask,&amp;nbsp;I'm biased. Anyway, back to coding.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;;subject=Google+Base+and+hypocricy" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;;title=Google+Base+and+hypocricy" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;title=Google+Base+and+hypocricy" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;;title=Google+Base+and+hypocricy" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx&amp;amp;;title=Google+Base+and+hypocricy&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/11/17/13862.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=13862" width="1" height="1"&gt;</description></item><item><title>The most innovative browser, please step forward (...not so fast FireFox)</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx</link><pubDate>Wed, 26 Oct 2005 23:35:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:13440</guid><dc:creator>jeffc</dc:creator><slash:comments>2</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/13440.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=13440</wfw:commentRss><description>&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Wow! Its mind boggling sometimes how quickly misinformation can spread across the web...especially when said information has an anti-Microsoft sentiment.&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Recently, a customer sent my company an article entitled "New Web Software a Challenge to Microsoft" (http://news.yahoo.com/s/ap/20051023/ap_on_hi_te/software_on_the_web). Within 24 hours, this article had spread to thousands of sites, including the CNN home page.&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;For those that haven't read it yet, I must warn you before you do. Don't bother with the grain of salt...go ahead and eat a whole box of it. For those who are interested, let me summarize. Essentially, the article states that Ajax provides a level of application responsiveness not seen before on the web. This application responsiveness makes it possible to port applications which mimic traditional Microsoft "powerhouse" applications such as Office in functionality to the web. This, in turn, is a threat to Microsoft. To quote one of the article's sources, product manager Alexei White, "[Ajax] definitely supports a Microsoft exit strategy". While I agree that Ajax is a good way to create extremely responsive web applications, I certainly disagree that this is in any way a negative development for Microsoft.&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Before I go on, I must point out that the article has several glaring technical inaccuracies and terminology confusions which make it rather clear that the writer is writing from more of a layman perspective. These technical inaccuracies are ultimately forgivable. After all, in the software industry (and especially Ajax), the difference between accurate and inaccurate is subtle and often confused by seasoned developers. However, even this aside, what can not be left alone is the inference that Ajax represents a "threat" to Microsoft.&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;In reference to Ajax, one point has to be made (and is only briefly mentioned in the article). The history/development of "Ajax" is nearly completely thanks to Microsoft. To illustrate this, let's examine the history of Ajax (source: my recollection combined with some USENET archive searches...ok not exactly hard evidence but anyone is welcome to point out any inaccuracies they find :).&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;BR&gt;&lt;STRONG&gt;Major milestones in the life of "Ajax"&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;1997 - Microsoft releases a development methodology called "remote scripting". (By the way, there is VERY LITTLE DIFFERENCE between Ajax and remote scripting, which was created almost 9 YEARS PRIOR to Ajax. They both involve making an out-of-band request to a webserver to acquire some small part of data for the purpose of client-side use. The initial Microsoft library used a Java Applet as the object which made the asynchronous request. Also around this time, some clever developers figured out a way to do a similar out-of-band request using a hidden IFRAME element).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;1999 - Microsoft, seeing the limitations in tying the "remote scripting" technology to a dying &amp;amp; insecure technology (Java Applets) introduces the XmlHttpRequest object in IE5 as a future replacement for it. In 6 years, this is to become one of the major callback workhorses in most Ajax libraries.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;2000 - Mozilla becomes the second major browser engine to support this technology by adding their version of the XmlHttpRequest object.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;2001 - Microsoft uses "remote scripting" techniques in Outlook Web Access (4 years before Gmail).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;2005 - In February, Gmail and Google Maps begin to enter the public consciousness as hugely successful applications.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;2005 - A few weeks following this, the developer of the applications coins the acronym "Ajax" for the underlying technology of these applications.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;2005 - Opera finally adds XmlHttp support as a result of the success of Gmail and Google Maps.&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;One is hard pressed to find many examples of where this technology wasn't pushed forward by Microsoft. In fact, Microsoft often pushed this technology to the derision of the Internet populace in general. When remote scripting was introduced, there were complaints of security holes, proprietary technology, etc. When they introduced the XmlHttp object, the same complaints resurfaced, as well as allegations of being more concerned about introducing new technology than properly implementing W3C standards. (&lt;A href="http://en.wikipedia.org/wiki/Features_of_Internet_Explorer"&gt;http://en.wikipedia.org/wiki/Features_of_Internet_Explorer&lt;/A&gt;). &lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Now that we have traced the historic milestones up to today, I could see how one could accept this brief history and still say "Well, they may have pioneered what became Ajax, but they did not capitalize on it TODAY and, much like Frankenstein's monster, it now stands poised to destroy them." (Ok, forgive the literary license I took there. You get the idea).&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Well, that's a fair point, if it were true. Unfortunately, it isn't. The brief history written above highlights a calculated plan by Microsoft to achieve exactly what we are seeing right now with Ajax. For the past 10 years, while thousands of companies have come and gone, Microsoft was truly shaping the course of the world wide web by changing the browser from a simple text renderer to a complex application host. How do we know this was their intention? Well, Bill Gates said it himself in 1999 (http://www.microsoft.com/billgates/speeches/09-15devdays.asp). &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;BR&gt;&lt;/FONT&gt;&lt;/o:p&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;&lt;EM&gt;"But at the heart of this is a new generation of applications, applications that run on a server, but take advantage of the rich capabilities of all the PCs and other devices that are out there. And Microsoft's success has always been keyed off of providing developers with tools to build the best applications. And so, in this new age of Internet applications, we're taking all of our developer pieces, and advancing them to make it as easy as possible to build these applications."&lt;BR&gt;~ &lt;/EM&gt;Sept 1999&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;And now that the "revolution" is started, no company is in better position to capitalize on these types of applications:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Ajax applications, since they are counter to the typical HTTP request/response protocol, can be extremely complex to write. Microsoft has put forward the only serious development platform (Visual Studio .NET) to create this level of application.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;ASP.NET 2.0 provides built-in "Ajax" support to any server control created in the library.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;With Atlas, Microsoft has created a sophisticated Ajax framework implementation.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P class=MsoNormal&gt;&lt;o:p&gt;&lt;FONT face=Arial size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;So, while these new companies fight to capitalize on a market (Office) that Microsoft dominated for the past 15 years, Microsoft has been busy laying the groundwork for what will be the next generation of Internet innovations.&amp;nbsp;Ajax is no threat to Office or Microsoft in general. There are free Office suites out there (OpenOffice) and a myriad of free web-based Word &amp;amp; Excel equivalents and yet Office still does very well. To quote Scott Guthrie in the aforementioned article: &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;EM&gt;"Ultimately when you want to write a word processing document or manage a large spreadsheet, you are going to want the capabilities ... that are very difficult to provide on the Web today."&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;;subject=The+most+innovative+browser%2c+please+step+forward+(...not+so+fast+FireFox)" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;;title=The+most+innovative+browser%2c+please+step+forward+(...not+so+fast+FireFox)" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;title=The+most+innovative+browser%2c+please+step+forward+(...not+so+fast+FireFox)" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;;title=The+most+innovative+browser%2c+please+step+forward+(...not+so+fast+FireFox)" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx&amp;amp;;title=The+most+innovative+browser%2c+please+step+forward+(...not+so+fast+FireFox)&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/10/26/13440.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=13440" width="1" height="1"&gt;</description></item><item><title>Design-time server control persistence.</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx</link><pubDate>Thu, 29 Sep 2005 21:16:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:12945</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/12945.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=12945</wfw:commentRss><description>&lt;P&gt;Usually, I am curious about any aspect of web development, but design-time WebForm stuff I am pretty happy to be ignorant of unless absolutely necessary. Well, that happened today, and since I couldn't find much info on this particular subject, I thought I would share for anyone else who has this problem.&lt;/P&gt;
&lt;P&gt;The problem was basically this. When a property&amp;nbsp;of our server control was modified at design-time, tons of extra, non-changed properties were persisted as server tag attributes as well. As an example, take my fake control Blah which has three properties.&lt;/P&gt;
&lt;P&gt;Blah.Color1 (type: System.Drawing.Color, default value: Color.Empty)&lt;BR&gt;Blah.Color2 (type: System.Drawing.Color, default value: Color.Empty)&lt;BR&gt;Blah.Color3 (type: System.Drawing.Color, default value: Color.Empty)&lt;/P&gt;
&lt;P&gt;If, in the designer, I changed Color1 to Color.Red, my server tag might persist like so:&lt;/P&gt;
&lt;P&gt;&amp;lt;cc1:Blah id="Blah1" runat="server" Color1="Red" Color2="" Color3="" /&amp;gt;&lt;/P&gt;
&lt;P&gt;when it should have persisted like so:&lt;/P&gt;
&lt;P&gt;&amp;lt;cc1:Blah id="Blah1" runat="server" Color1="Red" &amp;nbsp;/&amp;gt;&lt;/P&gt;
&lt;P&gt;Yes, the difference is trivial, and won't hurt execution at all, but it is annoying, and does cause a bit of additional, redundant code to execute...especially in the case of my actual control, where this was occurring for 50+ attributes.&lt;/P&gt;
&lt;P&gt;The actual class that performs the translation of set properties&amp;nbsp;to persisted server tags is the ControlPersister class in the System.Web.UI.Design namespace (in ASP.NET 1.1 and previous versions anyway...see below for 2.0). To simplify a bit, the design time execution invokes the static ControlPersister.PersistControl method, which takes care of querying the properties of the control, using the specified TypeConverter and PersistenceMode attribute for each propery to construct the string representation. You can even call this yourself, for example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;TextBox tb = new TextBox();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tb.ID = "mytextbox";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;tb.BackColor = Color.Red;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;string controlText = System.Web.UI.Design.ControlPersister.PersistControl(tb);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Diagnostics.Debug.WriteLine(controlText);&lt;/P&gt;
&lt;P&gt;outputs "&amp;lt;System.Web.UI.WebControls.TextBox runat="server" BackColor="Red" ID="mytextbox"&amp;gt;&amp;lt;/System.Web.UI.WebControls.TextBox&amp;gt;" as one might expect.&lt;/P&gt;
&lt;P&gt;So, what decides which properties are persisted as attributes?&amp;nbsp; Playing around a bit with the ControlPersister class, I began to get a better idea of the behavior. For my specific case, there were two major property attributes that controlled whether or not ControlPersister includes the property's value in the persisted text.&lt;/P&gt;
&lt;P&gt;DesignerSerializationVisibilityAttribute - When set to Hidden, the property is never included in tag persistence.&lt;BR&gt;DefaultValueAttribute - When the value of the property differs from what is specified here, it is included in tag persisted..&lt;/P&gt;
&lt;P&gt;Adding this to the knowledge about tag persistence that I already had, namely:&lt;/P&gt;
&lt;P&gt;PersistenceModeAttribute - Controls if the property is persisted as a top level attribute or an inner node.&lt;BR&gt;ParseChildrenAttribute - Determines whether nested tags are treated as properties or child controls.&lt;BR&gt;PersistChildrenAttribute - Defines whether or not to persist children at design time.&lt;BR&gt;&lt;/P&gt;
&lt;P&gt;and eventually I resolved the situation.&lt;/P&gt;
&lt;P&gt;For ASP.NET 2.0, it looks like this changes a bit. Some of the ControlPersister.PersistControl overloads are removed, and it uses the internal ControlsSerializer class to perform the grunt work....but generally the attributes mentioned above still behave the same way (as far as I know at least...someone let me know if I'm off base here).&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;;subject=Design-time+server+control+persistence." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;;title=Design-time+server+control+persistence." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;title=Design-time+server+control+persistence." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;;title=Design-time+server+control+persistence." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx&amp;amp;;title=Design-time+server+control+persistence.&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/29/12945.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=12945" width="1" height="1"&gt;</description></item><item><title>Creating a dynamic ProgressBar server control</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx</link><pubDate>Mon, 19 Sep 2005 13:55:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:12774</guid><dc:creator>jeffc</dc:creator><slash:comments>3</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/12774.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=12774</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;I wrote this for an ASP.NET portal, but they didn't use it. So, to the blog it goes.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A progress bar…in a web application?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Sure, it’s possible. In fact, progress bars have been in use for about as long as server-side programming has existed. Typically, however, these are meta-refresh based progress bars. These are the progress bars that use the 
&lt;META refresh&gt;tag to send a request to the server every X seconds to get the updated visual representation of the bar. Sure, it works, but results in a “white out” screen refresh (which looks clunky) and does not allow “interactive” progress (meaning that the progress bar can be modified in server-side code and it is immediately displayed in the browser without a refresh). It IS possible to achieve this effect however, by leveraging the “old school” ASP Response.Write() method.&lt;/P&gt;
&lt;P&gt;Most Microsoft web developers are familiar with the Response.Write() method, which adds data to the response stream. This method has been superseded for most functionality in ASP.NET, but we will revive it for our progress bar. The great thing about using Response.Write() is it causes the data to be sent immediately to the browser (unless Response.Buffer is true, in which case Response.Flush() has to be called as well to force the data to be sent immediately to the browser). This is not the case when using common ASP.NET techniques (such as Label.Text = “hello”;), in which case the data is not sent to the client until the rendering part of the Page execution cycle, when RenderContents is recursively called on all child controls.&lt;/P&gt;
&lt;P&gt;So, how is it Response.Write() used? First, on a postback, a long process that requires progress is started. Then, the initial progress bar structure is sent to the client using Response.Write, but the response is not terminated. Each time the progress bar needs to be extended, a bit of javascript is sent to the browser to extend the bar. When the long process is complete, the response is finally terminated. The result is a single loooooooooooooooooong response.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Creating the server control&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The server control, since it provides a user interface, will derive from the .NET Framework class System.Web.UI.WebControls.WebControl. This base class will provide extended UI support for our control such as design time behavior, style support, etc. &lt;/P&gt;
&lt;P&gt;using System;&lt;BR&gt;using System.Web;&lt;BR&gt;using System.Web.UI;&lt;BR&gt;using System.Web.UI.WebControls;&lt;BR&gt;using System.ComponentModel;&lt;BR&gt;using System.Drawing;&lt;BR&gt;using System.Text;&lt;/P&gt;
&lt;P&gt;namespace Blah&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class ProgressBar : System.Web.UI.WebControls.WebControl&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;Following the standard Windows forms ProgressBar, it will only add three properties onto the properties derived from WebControl.&lt;/P&gt;
&lt;P&gt;•&amp;nbsp;Minimum – The minimum value of the progress bar (typically 0)&lt;BR&gt;•&amp;nbsp;Maximum – The maximum value of the progress bar&lt;BR&gt;•&amp;nbsp;Value – The current value of the Progress&lt;/P&gt;
&lt;P&gt;The Minimum and Maximum properties are pretty simple, just saving/restoring the value to/from ViewState in the get/set accessor.&lt;/P&gt;
&lt;P&gt;public int Minimum&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = ViewState["minimum"];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (o == null) ? 0 : (int)o;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp; set&lt;BR&gt;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState["minimum"] = value;&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;public int Maximum&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = ViewState["maximum"];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (o == null) ? 100 : (int)o;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState["maximum"] = value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;The Value property is a little more complex. Since the user will be setting this property in their code, and expecting the visual update to occur immediately in the browser, special action is required when the property is set. &lt;/P&gt;
&lt;P&gt;This special action is as follows. On the first set of the property, the basic progress bar structure is drawn. The _ProgressBarDrawn flag controls this. Then, on each subsequent set, the progress bar is visually updated. When complete, the Value property should look something like the following:&lt;/P&gt;
&lt;P&gt;// Flag to monitor whether the progress bar has been drawn&lt;BR&gt;private bool _ProgressBarDrawn = false;&lt;/P&gt;
&lt;P&gt;public int Value&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = ViewState["value"];&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (o == null) ? 0 : (int)o;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState["value"] = value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(!_ProgressBarDrawn)&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DrawProgressBar();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateProgress();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/P&gt;
&lt;P&gt;So, what is in the DrawProgressBar() and UpdateProgress() functions? The DrawProgressBar() function is only called once per request (thus the previously discussed flag) to write out the initial progress bar structure. This content is immediately sent to the browser to be displayed.&lt;/P&gt;
&lt;P&gt;private void DrawProgressBar()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page.Response.Write("&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write(ControlStyle.ToString());&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("&amp;lt;div id='divProgress' ");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("style='WIDTH:" + GetAdjustedValue() + ";");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("HEIGHT:" + Height.ToString() + ";");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("BACKGROUND-COLOR:" + ColorTranslator.ToHtml(BackColor) + "'&amp;gt;");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("&amp;lt;/div&amp;gt;");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Flush the output to the browser if required.&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(this.Page.Response.Buffer) this.Page.Response.Flush();
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Set the flag so the progress bar is not redrawn&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;_ProgressBarDrawn = true;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;The UpdateProgress() function&amp;nbsp; is called each time Value is set to write out some JavaScript to change the width of the div element created above to the current value. This is also flushed immediately to the browser.&lt;/P&gt;
&lt;P&gt;private void UpdateProgress()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Write out the JavaScript to extend the bar.&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("&amp;lt;script language='JavaScript'&amp;gt;\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page.Response.Write("document.getElementById('divProgress').style.width = '" + GetAdjustedValue() + "';\r\n");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("&amp;lt;/scr");&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Page.Response.Write("ipt&amp;gt;\r\n"); 
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;// Flush the output to the browser.&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(this.Page.Response.Buffer) this.Page.Response.Flush();&lt;BR&gt;} 
&lt;P&gt;As you can see, both of these functions call a helper function called GetAdjustedValue(). This simply returns the proper value to use for the current progress bar width based on Value, Width, Maximum, and Minimum. 
&lt;P&gt;private Unit GetAdjustedValue()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; int range = Maximum - Minimum;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;double ratio = (((double)Value)/((double)range));&lt;BR&gt;&amp;nbsp;&amp;nbsp; int adjustedValue = (int)(Width.Value * ratio);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return new Unit(adjustedValue);&lt;BR&gt;} 
&lt;P&gt;Anything else? Yep, we have to override the Render method to suppress the default ASP.NET rendering of the control. Since we are doing our own rendering at run time (when the Value property is set, above), the ASP.NET rendering is redundant, and will seriously mess up the UI. 
&lt;P&gt;protected override void Render(HtmlTextWriter writer)&lt;BR&gt;{&lt;BR&gt;} 
&lt;P&gt;Why can’t we just render all of the HTML within the Render() method (or RenderContents() method)? Well, as explained above, the progress bar updates visually each time Value is set, so the appropriate JavaScript needs to be sent immediately when Value is set. The Render method is not invoked by the ASP.NET runtime until much later in page cycle, so it is too late to send the HTML at that time. Yes, this is a hack and outside of the expected ASP.NET Page Cycle, but by nature a ProgressBar is contrary to a typical HTTP request/response cycle. 
&lt;P&gt;That’s it. Once all of the above properties and methods are in your server control class, you’re done. Compile the server control dll. 
&lt;P&gt;&lt;STRONG&gt;Testing the server control&lt;/STRONG&gt; 
&lt;P&gt;Now create a simple little ASP.NET app to test the control. First create a new WebForm in your favorite development environment, and drag an instance of our control on the form (note, you will not see a visual representation of the control on the design surface, as we did not associate a Designer with the control class. More on this in the “Extending the server control” section below). Also, add a standard ASP.NET button to the WebForm. In the Page.Load event, add the following code to configure the progress bar. 
&lt;P&gt;private void Page_Load(object sender, System.EventArgs e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; // Configure the ProgressBar&lt;BR&gt;&amp;nbsp;&amp;nbsp; ProgressBar1.Minimum = 0;&lt;BR&gt;&amp;nbsp;&amp;nbsp; ProgressBar1.Maximum = 100;&lt;BR&gt;&amp;nbsp;&amp;nbsp; ProgressBar1.BackColor = Color.Blue;&lt;BR&gt;&amp;nbsp;&amp;nbsp; ProgressBar1.Height = new Unit(20);&lt;BR&gt;&amp;nbsp;&amp;nbsp; ProgressBar1.Width = new Unit(200);&lt;BR&gt;} 
&lt;P&gt;Also, within the Button.Click event, add the following code to test the progress. Typically you would do something that would require actual progress (such as a file transfer, database query, webservice call, etc). To keep this sample simple, we will simply loop 100 times, pausing each iteration to simulate some process that takes time. 
&lt;P&gt;private void Button1_Click(object sender, System.EventArgs e)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Simulate a process that requires progress&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(int i=0; i&amp;lt;100; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the ProgressBar.Value&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ProgressBar1.Value = i;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Threading.Thread.Sleep(20);&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;} 
&lt;P&gt;Compile and run. Click the button. You should see some progress happening! 
&lt;P&gt;&lt;IMG src="http://www.3crans.com/progress.gif"&gt; 
&lt;P&gt;&lt;STRONG&gt;Why, when I set other style properties (such as BorderColor, etc) it doesn’t show up?&lt;/STRONG&gt; 
&lt;P&gt;Recall how non-standard rendering techniques were used each time the Value property was set. If we were using the standard technique of putting all of the rendering code within the RenderContents() method, style attributes would be automatically applied (but the dynamic, interactive progress would no longer work). Since we are replacing the built-in rendering logic with our own, we have to also write the logic to handle style application. This is demonstrated in the DrawProgressBar() method, when BackColor, Height, and Width are used to set up the initial progress bar. It would be just as easy to check if BorderColor (and other style properties) were set and modify the rendered HTML to account for these properties. 
&lt;P&gt;&lt;STRONG&gt;Extending the server control&lt;/STRONG&gt;. 
&lt;P&gt;For the sake of brevity, this server control code is kept as simple as possible. However, with a couple of additions (using the techniques demonstrated above) a professional quality product could be achieved. 
&lt;P&gt;•&amp;nbsp;As mentioned in the section above, write the logic to account for all WebControl styles (BackColor, BorderColor, CssClass, etc).&lt;BR&gt;•&amp;nbsp;Create a ControlDesigner class so you can provide a better design-time representation of the control.&lt;BR&gt;•&amp;nbsp;Add a Text property containing text that can be updated in real time just like the Value property.&lt;BR&gt;•&amp;nbsp;Add a “segmented progress” mode in addition to the “smooth progress” mode.&lt;BR&gt;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;;subject=Creating+a+dynamic+ProgressBar+server+control" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;;title=Creating+a+dynamic+ProgressBar+server+control" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;title=Creating+a+dynamic+ProgressBar+server+control" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;;title=Creating+a+dynamic+ProgressBar+server+control" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx&amp;amp;;title=Creating+a+dynamic+ProgressBar+server+control&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/09/19/12774.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=12774" width="1" height="1"&gt;</description></item><item><title>Server Control to Server Control data sharing</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx</link><pubDate>Tue, 19 Jul 2005 20:44:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2666</guid><dc:creator>jeffc</dc:creator><slash:comments>4</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/2666.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=2666</wfw:commentRss><description>&lt;P&gt;Recently, I had to implement an in-page communication system between custom server controls. Essentially, all controls had to have access to a shared property at any point in the Page life cycle INCLUDING design-time. So, when this shared property changes for one control, all other controls must reflect the same value. There are three basic scenarios to be concerned with when implementing server control&amp;nbsp;to server control communication.&lt;/P&gt;
&lt;P&gt;So, to simpify things, lets just say my server control (called &amp;#8220;MyControl&amp;#8221;)&amp;nbsp;has a property called &amp;#8220;Blah&amp;#8220; which, when set, has to update the &amp;#8220;Blah&amp;#8220; properties of all other &amp;#8220;MyControls&amp;#8220; on the page.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;At run time -&amp;nbsp;post Page_Load:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This is the simplest scenario. After Page_Load, the page control heirarchy has been constructed, so any control can easily access another control either by transversing the Parent/Controls property, or by simply using FindControl.&lt;/P&gt;&lt;FONT color=#008000&gt;&lt;FONT color=#0000ff&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; Blah&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; ViewState["Blah"];&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; set&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ViewState["Blah"] = value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Now update all controls on the Page&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // This code assumes that Page_Load has already executed, so the control heirarchy has been constructed.&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArrayList controls = GetAllControls(this, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach(Control c in&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; controls)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((MyControl)c).Blah = value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;private&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; ArrayList GetAllControls(Control startControl, ArrayList controls)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; if(controls == null) controls = new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; ArrayList();&lt;BR&gt;&amp;nbsp;&amp;nbsp; foreach(Control c in&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; startControl.Controls)&lt;BR&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Add the control if it is the same type&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(c is MyControl &amp;amp;&amp;amp; (!c.Equals(this&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;)))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controls.Add(c);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetAllControls(c, controls);&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; controls;&lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;P&gt;Using this technique, as long as the control heirarchy has been created,&amp;nbsp;one could easily find all appropriate controls on the Page, and update the shared member when needed.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;At run time -&amp;nbsp;pre Page_Load:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This scenario is a little more difficult, as the page control heirarchy has not been constructed, so the above technique wouldn't work. No control on the Page has guarenteed access to any other control on the Page. However, one could use the Page.Context object, which exists for the lifetime of each control, to store the shared value for Blah. The only technical hurdle is that the server control does not have access to the Page.Context, as it is Protected. You could get around this by using reflection.&lt;/P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; Blah&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;get&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;// Get the Page context using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext context = (HttpContext)Page.GetType().GetProperty("Context", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; context.Items["Blah"];&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;set&lt;BR&gt;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;// Get the Page context using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext context = (HttpContext)Page.GetType().GetProperty("Context", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context.Items["Blah"] = value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Now, all of the MyControls on the Page are reading/writing to the same value, so there is no reason to do the explicit update like in the first example. In fact, since this technique works both in pre-Page_Load and post-Page_Load, it more or less supercedes technique #1. So we can just use it instead. 
&lt;P&gt;&lt;STRONG&gt;At design time:&lt;/STRONG&gt; 
&lt;P&gt;This is the most difficult scenario to deal with, as Page.Context is null at design-time, so the above technique won't work. However, Page.ViewState is not null, so shared items can be stored there. And, because these items are only stored in ViewState during design time, the values&amp;nbsp;wont be persisted to the actual ViewState when the page is executed. &lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;
&lt;P&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;public&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt; object&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; Blah&lt;BR&gt;{&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the Page context using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext context = (HttpContext)Page.GetType().GetProperty("Context", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;);&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;// Check if context is not null&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(context != null) return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT face="Courier New" color=#000000&gt; context.Items["Blah"];&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Context is null, it must be design time.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the Page ViewState using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StateBag viewState = (StateBag)Page.GetType().GetProperty("ViewState", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt; viewState["Blah"];&lt;BR&gt;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; set&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the Page context using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpContext context = (HttpContext)Page.GetType().GetProperty("Context", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT face="Courier New" color=#000000&gt;);&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT face="Courier New" color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Check if context is not null&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(context != null) context.Items["Blah"] = value&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;&lt;FONT face="Courier New" color=#000000&gt;;&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color=#000000 size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Context is null, it must be design time.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Get the Page ViewState using Reflection&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StateBag viewState = (StateBag)Page.GetType().GetProperty("ViewState", (BindingFlags)36).GetValue(Page, null&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT face="Courier New" size=1&gt;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; viewState["Blah"] = value&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT color=#000000 size=1&gt;;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/FONT&gt;&lt;FONT color=#000000&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;Not a perfect solution. For one, ViewState persistence is lost with the final example, so that has to be dealt with...but that's easy enough and the goal has been met.&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;;subject=Server+Control+to+Server+Control+data+sharing" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;;title=Server+Control+to+Server+Control+data+sharing" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;title=Server+Control+to+Server+Control+data+sharing" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;;title=Server+Control+to+Server+Control+data+sharing" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx&amp;amp;;title=Server+Control+to+Server+Control+data+sharing&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/07/19/2666.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2666" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/jeffc/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Pushing callback technology to the limit. LivePaint (Part I).</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx</link><pubDate>Fri, 10 Jun 2005 21:48:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2665</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/2665.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=2665</wfw:commentRss><description>&lt;P&gt;I wanted to try to see how close to &amp;#8220;real-time&amp;#8221;&amp;nbsp;my company's &amp;#8220;callback-enabled&amp;#8220; LiveControls could come in terms of communication with the server. It occurred to me that a cross-browser web paint application would be a great test of this feature. Here were the specs of the test&amp;nbsp;application:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Must be cross browser compatible (basically just IE and Firefox for the purposes of this test). 
&lt;LI&gt;Must be ran across the Internet (it is&amp;nbsp;too easy to do&amp;nbsp;across a local network) without extensive lagging. 
&lt;LI&gt;User can&amp;nbsp;draw on the canvas with the pencil. 
&lt;LI&gt;User&amp;nbsp;can switch colors.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Yeah, a pretty simple paint app, but enough to test. I felt that this would be a perfect test because (1) It would have to use the MouseMove event, which is probably the most often raised client-side event (although I have no stats to back this statement up) and (2) because&amp;nbsp;even the slightest&amp;nbsp;lag whatsoever would be detectable by the user. To my knowledge, there is no current application which is able to achieve all of the above using cross browser DHTML.&amp;nbsp;I did find one fantastic JavaScript library which is able to draw shapes such as ovals and other curves at &lt;A href="http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm"&gt;http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm&lt;/A&gt;. The developer used a pretty ingenious strategy of using 1 X 1 DIV elements to represent pixels (and even went so far as to join consecutive DIVS where possible to reduce the number of client side HTML elements used). Unfortunately, this strategy is too &amp;#8220;client-heavy&amp;#8220; to make an effective paint program.&lt;/P&gt;
&lt;P&gt;Here is a description of the basic architecture:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A LiveImage comprises the canvas. 
&lt;LI&gt;The mousemove event over the image&amp;nbsp;accumulates mouse coords. 
&lt;LI&gt;A LiveTimer periodically updates the server with the new mouse coord data (60 milliseconds is the default I used) 
&lt;LI&gt;Within the LiveTimer.Tick event, a new canvas .gif file is created from the mouse coord data using System.Drawing namespace and stored in the Session. 
&lt;LI&gt;The LiveImage.ImageUrl property is set to the new url. 
&lt;LI&gt;An HttpHandler receives the request for the new image. 
&lt;LI&gt;The image is retrieved from the session and streamed back out to the browser.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;So, how successful was I? You tell me (although you probably could guess I wasn't terribly successful since this blog post is titled &amp;#8220;LivePaint Part I&amp;#8220;). An online version can be reached at &lt;A href="http://www.dart.com/livepaint/canvas.aspx" target=_new&gt;http://www.dart.com/livepaint/canvas.aspx&lt;/A&gt;. If you want to see the code, it can be downloaded from &lt;A href="http://www.dart.com/livepaint/livepaint.zip" target=_new&gt;http://www.dart.com/livepaint/livepaint.zip&lt;/A&gt;&amp;nbsp;(you also need the PowerWEB LiveControls for ASP.NET developers kit available at &lt;A href="http://www.dart.com/powerweb/livecontrols.asp"&gt;http://www.dart.com/powerweb/livecontrols.asp&lt;/A&gt;&amp;nbsp;to run the sample)&lt;/P&gt;
&lt;P&gt;I see two problems with my sample so far:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Since the line is not a bezier curve, but a non-related plotting of pixels, the line looks choppy and often has gaps. 
&lt;LI&gt;There is a very noticeable lag.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;So, expect LivePaint Part II very shortly. I'll keep working through this until I get some decent results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;;subject=Pushing+callback+technology+to+the+limit.+LivePaint+(Part+I)." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;;title=Pushing+callback+technology+to+the+limit.+LivePaint+(Part+I)." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;title=Pushing+callback+technology+to+the+limit.+LivePaint+(Part+I)." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;;title=Pushing+callback+technology+to+the+limit.+LivePaint+(Part+I)." target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx&amp;amp;;title=Pushing+callback+technology+to+the+limit.+LivePaint+(Part+I).&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/10/2665.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2665" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/jeffc/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Swag at Tech-Ed 2005!</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx</link><pubDate>Thu, 09 Jun 2005 11:18:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2664</guid><dc:creator>jeffc</dc:creator><slash:comments>0</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/2664.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=2664</wfw:commentRss><description>&lt;P&gt;What happens to us when we get into a conference setting? Here I am, a grown adult, father, husband, going up to another adult and meekly saying "Hey, what do you have to do to get one of those weeble-wobble business card holders?".&lt;/P&gt;
&lt;P&gt;One company had a large stage on which a gentleman was giving a presentation. Periodically, he would pause and prompt the audience, to which they would yell something like "Kill Spam Dead!" (or something like that). I'm sure when designing this promo, they envisioned riotous mobs...fists pumping in the air, screaming "KILL SPAM DEAD!". Unfortunately, the actual effect was three or so of the audience, mumbling the phrase at a scarcely audible level. &lt;/P&gt;
&lt;P&gt;Another booth was giving away 1 dollar bills for badge scans. I happened to walk by this booth while talking with a Microsoft guy. He said to the guy running the booth "No thanks, I don't reach out for money." I had to agree. I mean, if a dollar fell from the sky and happened to land in my hand, I certainly wouldn't throw it away, but definitely not worth the effort of getting scanned and getting the whole sales spiel.&lt;/P&gt;
&lt;P&gt;There were two pieces of swag that I actually did want. One was a "Hitchhiker's Guide style" t-shirt from Red-Gate (by the way, their ANTS code profiler is a really great product). I managed to get one of these. The other was a Microsoft shirt with the Linux penguin being shot "shooting gallery" style. Unfortunately, they ran out of this one...so no luck for me :(&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;[Added June 9]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Well, spoke too soon. I happened to mention the &amp;#8220;KILL SPAM DEAD&amp;#8221; guy to our company CEO, and he ended up using the idea at his presentation at the Partner's Theater. Not sure if he had better results than the Spam guy though.&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;;subject=Swag+at+Tech-Ed+2005!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;;title=Swag+at+Tech-Ed+2005!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;title=Swag+at+Tech-Ed+2005!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;;title=Swag+at+Tech-Ed+2005!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx&amp;amp;;title=Swag+at+Tech-Ed+2005!&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/09/2664.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2664" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/jeffc/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>JavaScript on demand!</title><link>http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx</link><pubDate>Thu, 09 Jun 2005 01:17:00 GMT</pubDate><guid isPermaLink="false">e709ad4c-0c15-48eb-915e-c462c6e85445:2663</guid><dc:creator>jeffc</dc:creator><slash:comments>1</slash:comments><comments>http://aspadvice.com/blogs/jeffc/comments/2663.aspx</comments><wfw:commentRss>http://aspadvice.com/blogs/jeffc/commentrss.aspx?PostID=2663</wfw:commentRss><description>&lt;P&gt;A few months ago, my company released a new product (&lt;A href="http://www.dart.com/powerweb/livecontrols.asp" target=_new&gt;LiveControls for ASP.NET&lt;/A&gt;) that we periodically find a new use for that was not in the original design. To save you a trip to the website, this product is a suite of server controls which use callback technology to raise events on the server. Within the event, you can set properties on other LiveControls on the page, which is converted to JavaScript and shipped back to the client where it is executed. As a result, the request and response are significantly smaller,&amp;nbsp;the DOM does not need to be recreated on the client-side with each request, and there is no UI disruption. Think of it as an AJAX where you don't have to write any JavaScript whatsoever.&lt;/P&gt;
&lt;P&gt;So today at Tech-Ed, my boss coined the phrase &amp;#8220;JavaScript on demand&amp;#8221; as one of the selling points&amp;nbsp;while describing our product. It hadn't occurred to me prior to this point (I was much more interested in the speed and seamlessness of the UI updates). Basically, when the page initially loads, it contains no JavaScript whatsoever. As the user interacts with the page, and JavaScript is needed to perform some DHTML magic, the intrepid callback mechanism is transparently sent to the server to retrieve ONLY the JavaScript required, and it is immediately executed. &lt;/P&gt;
&lt;P&gt;Feeling in a metaphoric mood, I threw out this gem. &amp;#8220;The current system is like when a plumber comes to your house to fix your sink, and first empties the entire contents of the van into a big pile the kitchen. He looks at the sink, grabs a wrench, and fixes the sink, whereas with our product the plumber only brings the wrench out of the van.&amp;#8220;&lt;/P&gt;
&lt;P&gt;Well, not 100% accurate (I don't think I've ever said&amp;nbsp;&amp;#8220;whereas&amp;#8220; in conversation) but the general gist. Anyway, it really uncovered a powerful feature I hadn't thought of. The page interaction is as efficient as possible... with faster downloads (since no unneeded JavaScript is sent to the user) and less client resource consumption (since it doesn't have to parse and cache a large JavaScript file). Of course I was always aware of this happening, I hadn't considered it purely from a client-side resource consumption aspect.&lt;/P&gt;
&lt;P&gt;Anyway, from now on I'll just pretend that this was in the design of the product since day 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;;subject=JavaScript+on+demand!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;;title=JavaScript+on+demand!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;title=JavaScript+on+demand!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;;title=JavaScript+on+demand!" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx&amp;amp;;title=JavaScript+on+demand!&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/jeffc/archive/2005/06/08/2663.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2663" width="1" height="1"&gt;</description><category domain="http://aspadvice.com/blogs/jeffc/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>