<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/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>Infinities Loop</title><link>http://weblogs.asp.net/infinitiesloop/default.aspx</link><description>ASP.NET and .NET from a new perspective</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Google Chrome - Aw, Snap!</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/09/03/google-chrome-aw-snap.aspx</link><pubDate>Thu, 04 Sep 2008 05:32:37 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6597803</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6597803</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/09/03/google-chrome-aw-snap.aspx#comments</comments><description>Plenty of people have already seen this... interesting... error screen in chrome. I wanted to see what a run-away script would do to Chrome. There's always a warning that the script is taking too long, giving you a chance to shut it down. Here's what...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/09/03/google-chrome-aw-snap.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6597803" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/JavaScript/default.aspx">JavaScript</category></item><item><title>Visual Studio Tip: Disable F1!</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/07/18/visual-studio-tip-disable-f1.aspx</link><pubDate>Fri, 18 Jul 2008 20:35:34 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6417150</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6417150</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/07/18/visual-studio-tip-disable-f1.aspx#comments</comments><description>Lately I've been using a laptop more often than a desktop to work in Visual Studio, and of course like most laptop keyboards, the keys are jammed close together. The most annoying thing I keep doing by mistake is hitting F1 instead of Escape, which of...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/07/18/visual-studio-tip-disable-f1.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6417150" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Coding+Environment/default.aspx">Coding Environment</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Keyboard/default.aspx">Keyboard</category></item><item><title>My Latest Work</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/06/17/my-latest-work.aspx</link><pubDate>Wed, 18 Jun 2008 04:18:48 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6288949</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>21</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6288949</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/06/17/my-latest-work.aspx#comments</comments><description>Sky Lynn Reed's 0th birthday is 5/15/2008 at 5:44pm, when she weighed 8 pounds, 0 ounces. A nice round binary number. Our first born! There are simply no words to describe the experience. We debated on whether we should have kids for a long time. After...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/06/17/my-latest-work.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6288949" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Musings/default.aspx">Musings</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Off+Topic/default.aspx">Off Topic</category></item><item><title>Flickering UI From the ASP.NET AJAX Toolkit TabContainer while in an UpdatePanel?</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/04/30/flickering-ui-from-the-asp-net-ajax-toolkit-tabcontainer-while-in-an-updatepanel.aspx</link><pubDate>Wed, 30 Apr 2008 18:57:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6145452</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6145452</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/04/30/flickering-ui-from-the-asp-net-ajax-toolkit-tabcontainer-while-in-an-updatepanel.aspx#comments</comments><description>UPDATE This issue is officially fixed in .NET 3.5 SP1. If you have applied the workaround in this blog post, you no longer need it. But the story of this bug is still rather interesting. UPDATE If you upgrade from Microsoft ASP.NET AJAX Extensions 1.0...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/04/30/flickering-ui-from-the-asp-net-ajax-toolkit-tabcontainer-while-in-an-updatepanel.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6145452" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Script+Loading/default.aspx">Script Loading</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/HTML/default.aspx">HTML</category></item><item><title>TRULY Understanding Dynamic Controls by Example</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/04/23/truly-understanding-dynamic-controls-by-example.aspx</link><pubDate>Wed, 23 Apr 2008 07:53:17 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6123575</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6123575</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/04/23/truly-understanding-dynamic-controls-by-example.aspx#comments</comments><description>Many of the comments I've received in the various dynamic controls entries I've written have been questions for help with a specific scenario. A lot of those scenarios are similar. One in particular I keep hearing is something as follows: The user is...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/04/23/truly-understanding-dynamic-controls-by-example.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6123575" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ViewState/default.aspx">ViewState</category></item><item><title>OnLoad vs. Page_Load vs. Load event</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/03/24/onload-vs-page-load-vs-load-event.aspx</link><pubDate>Tue, 25 Mar 2008 02:32:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6021600</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>20</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=6021600</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/03/24/onload-vs-page-load-vs-load-event.aspx#comments</comments><description>I get this question a lot for some reason. The more general question is whether it is better to override a virtual method on the page or control in question (OnLoad, OnInit, OnPreRender, etc), or to hook into the corresponding event . For page development...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/03/24/onload-vs-page-load-vs-load-event.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6021600" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Musings/default.aspx">Musings</category></item><item><title>TRULY Understanding ViewState, the comment index</title><link>http://weblogs.asp.net/infinitiesloop/archive/2008/02/19/truly-understanding-viewstate-comment-index.aspx</link><pubDate>Wed, 20 Feb 2008 05:23:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5825826</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>13</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=5825826</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2008/02/19/truly-understanding-viewstate-comment-index.aspx#comments</comments><description>A long time ago I published one of my first blog entries, TRULY Understanding ViewState . And what an experience it has been. It was pretty popular with commenters, so much so I decided to spin off a whole series of articles, TRULY Understanding Dynamic...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2008/02/19/truly-understanding-viewstate-comment-index.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5825826" width="1" height="1"&gt;</description><enclosure url="http://weblogs.asp.net/infinitiesloop/attachment/5825826.ashx" length="641536" type="application/msword" /><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ViewState/default.aspx">ViewState</category></item><item><title>ASP.NET Futures: Intro to the Xaml and Media Controls</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/11/12/asp-net-futures-intro-to-the-xaml-and-media-controls.aspx</link><pubDate>Tue, 13 Nov 2007 01:46:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5107729</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=5107729</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/11/12/asp-net-futures-intro-to-the-xaml-and-media-controls.aspx#comments</comments><description>&lt;P&gt;Still relatively unknown, &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a5189bcb-ef81-4c12-9733-e294d13a58e6&amp;amp;displaylang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=a5189bcb-ef81-4c12-9733-e294d13a58e6&amp;amp;displaylang=en"&gt;ASP.NET Futures&lt;/A&gt; is a nice little add-on to ASP.NET and ASP.NET AJAX that contains some features we want public feedback on. It's a playground in which technology gets to frolic in front of the public's (your) eyes. So why not seize the opportunity to play with the bits and submit your thumbs up, thumbs down?&lt;/P&gt;
&lt;P&gt;I thought I'd give an introduction to two of the controls in ASP.NET Futures that I'm most fond of (I've worked on them, so I'm a little bit partial). If you already know about them, excellent, please log in some feedback.&lt;/P&gt;
&lt;H3&gt;&amp;lt;asp:Xaml runat="server" /&amp;gt;&lt;/H3&gt;
&lt;P&gt;The Xaml control is an integration story between Silverlight and ASP.NET. If you are writing ASP.NET pages that contain Silverlight content, especially if you are also using AJAX features, it's definitely worth a look. Because it's not only an integration of Silverlight and ASP.NET, but between Silverlight and ASP.NET AJAX. It defines a new client-side ajax type, Sys.Preview.UI.Xaml.Control. So, if you are familiar with ASP.NET and with ASP.NET AJAX, this control gives you a logical extension. Just point the control at a XAML resource, and it wraps an ajax type around Silverlight, giving you a familiar and object-oriented asp.net ajax programming model to work with the surface area between the HTML page and the Silverlight plugin instance.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://quickstarts.asp.net/Futures/Silverlight/xaml.aspx" target=_blank mce_href="http://quickstarts.asp.net/Futures/Silverlight/xaml.aspx"&gt;Take a look&lt;/A&gt; at a Calculator implemented using the Xaml control.&lt;/P&gt;
&lt;H3&gt;&amp;lt;asp:Media runat="server" /&amp;gt;&lt;/H3&gt;
&lt;P&gt;I said it is object oriented, and it is. The media control defines another client-side ajax type which derives from the first: Sys.Preview.UI.Xaml.Media.Player. When this type wraps a Silverlight plug-in, it does a lot of work to it, searching within the Xaml document for elements of certain predetermined names like "PlayButton", and makes them more than just a pretty Canvas by adding behavior to them implied by their name. It may seem trivial, but there are &lt;EM&gt;a lot&lt;/EM&gt; of subtle things that must happen to make what is essentially static markup (the xaml) behave like a full-blown media player. Silverlight makes it look pretty. The Media control brings it to life.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Not just a black box&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When you watch video on a web page, you probably don't expect much in the way of interaction between the video and the page. The video is like a rich island in the middle of boring HTML, and never the twain shall meet. Even the orientation of the video is pretty much fixed -- ever seen a movie playing on a webpage at at 15 degree angle? I haven't. I'm not sure I want to, but I sure haven't!&lt;/P&gt;
&lt;P&gt;But it doesn't have to be that way... The media control exposes some pretty cool client-side APIs in the form of properties and events that allow for some really interesting interaction between the media and the rest of the page. asp:Media... Tearing down walls!&lt;/P&gt;
&lt;P&gt;&lt;A href="http://quickstarts.asp.net/Futures/Silverlight/media.aspx" target=_blank mce_href="http://quickstarts.asp.net/Futures/Silverlight/media.aspx"&gt;Take a look&lt;/A&gt; at some of the cool things you can do with it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Not just for fun, either&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The Media control can work with any Xaml. It's very forgiving with which Xaml elements it requires, too. What? Your Xaml doesn't have a MuteButton? Ok, no problem. But it does have a WizzyWigDoSomethingButton -- well, it doesn't know what that is, but a client-side type you create that derives from the media player's client side type knows what to do with it.&lt;/P&gt;
&lt;P&gt;The only element required is the MediaElement. Yeah you kind of need that one...&lt;/P&gt;
&lt;P&gt;You get the picture. But what most people don't know, even those who use it, is that the client-side code that drives the Media control has already appeared in many places. So many, in fact, that if you've seen video playing in Silverlight, you've probably executed the code. The code was joint developed and is shared by the Expression Encoder product, which allows you to export videos to html for execution in Silverlight. It too creates nice media player functionality in Silverlight... and it does it using the exact same code the Media control uses. Well, the namespace is different. But that's it.&lt;/P&gt;
&lt;P&gt;Here are some examples of sites using the Media control's client-side ajax type. Note how vastly different they look and behave -- a testament to Silverlight and this control.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://halo3.msn.com/videosHD.aspx" target=_blank mce_href="http://halo3.msn.com/videosHD.aspx"&gt;Halo 3 on MSN&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://silverlight.net/learn/learnvideos.aspx" target=_blank mce_href="http://silverlight.net/learn/learnvideos.aspx"&gt;The Silverlight Learning Videos&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.microsoft.com/silverlight/" target=_blank mce_href="http://www.microsoft.com/silverlight/"&gt;Silverlight on Microsoft.com&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://channel9.msdn.com/" target=_blank mce_href="http://channel9.msdn.com/"&gt;The Channel 8 and Channel 9 Video Players&lt;/A&gt;&lt;BR&gt;(hear about this one &lt;A href="http://channel9.msdn.com/showpost.aspx?postid=344297" target=_blank mce_href="http://channel9.msdn.com/showpost.aspx?postid=344297"&gt;here&lt;/A&gt;. Favorite quote, "It seems almost too easy...")&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://www.clarkezone.net/" target=_blank mce_href="http://www.clarkezone.net/"&gt;James Clarke's Weblog&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;So there you have it. If you want to play video or audio on your site using Silverlight, and you don't want to implement an entire media player UI from scratch, have a look-see.&lt;/P&gt;
&lt;P&gt;EDIT: Hey, my first post tagged "Silverlight". Expect more in the future.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5107729" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Migraine m = (Migraine) DiagnosisFactory.Diagnose(pain)</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/11/05/migraine-m-migraine-diagnosisfactory-diagnose-pain.aspx</link><pubDate>Tue, 06 Nov 2007 02:51:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4914103</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=4914103</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/11/05/migraine-m-migraine-diagnosisfactory-diagnose-pain.aspx#comments</comments><description>&lt;P mce_keep="true"&gt;I've struggled with pretty bad headaches probably ever since high school. They come and go with intensity and frequency. Sometimes I think I have them figured out. Eat right, and before I get starving, get enough sleep, and they usually leave me alone. But stressful times, like long business trips or big presentations, or other matters, can easily prompt one. I've grown so used to them that I always make sure I have a supply of Excedrin nearby. There's a bottle at home, up and down stairs, at work, even in the car for those unexpected times. I even have family members be sure to have a stock if I know I'll be visiting for an extended period of time.&lt;/P&gt;
&lt;P mce_keep="true"&gt;For whatever reason, Excedrin seems to be the only thing that helps. Nothing else even touches my headaches. But sometimes, on rare occasions, even Excedrin fails. Today was one of those times.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Bad enough that I finally went to a doctor about it (I was lucky to get a walk-in appointment). After describing all my symptoms, sure enough, these Excedrin-immune headaches are the migraine variety.&lt;/P&gt;
&lt;P mce_keep="true"&gt;If you've had a migraine, I need not explain how terrible they are. If you're one of the lucky ones&amp;nbsp;who don't get them, well, for me they on par with a really bad hangover.&lt;/P&gt;
&lt;P mce_keep="true"&gt;There are lots of options these days&amp;nbsp;for&amp;nbsp;dealing with&amp;nbsp;them. The key is preventing them by understanding what triggers them for you. I've lived with them all my life so far because they crept up on me. I never thought they were migraines because descriptions I read of them seem much more severe than what I have. Indeed I do seem to be luckier than most migraine sufferers -- they are bad, but not so bad that I must lock myself in a dark room for two days. Just thought I'd share my experience -- I'm sure lots of you can relate!&lt;/P&gt;
&lt;P mce_keep="true"&gt;Perhaps this is one sub-conscious reason why I prefer &lt;A class="" href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/06/Join-the-Dark-Side-of-Visual-Studio.aspx" target=_blank mce_href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/06/Join-the-Dark-Side-of-Visual-Studio.aspx"&gt;The Dark Side of Visual Studio&lt;/A&gt;. The bright light of the normal color scheme is just too overpowering.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4914103" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/Off+Topic/default.aspx">Off Topic</category></item><item><title>Understanding what Page.RegisterRequiresPostBack does</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/10/25/understanding-what-page-registerrequirespostback-does.aspx</link><pubDate>Thu, 25 Oct 2007 17:35:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4745436</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=4745436</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/10/25/understanding-what-page-registerrequirespostback-does.aspx#comments</comments><description>&lt;P&gt;I recently received a comment in my &lt;A href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx" target=_blank mce_href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx"&gt;Truly Understanding ViewState&lt;/A&gt; article about the "ArrayList of controls in the control hierarchy that need to be explicitly invoked by the page class during the raise postback event stage of the life cycle." Such is the 3rd entry in the master Triplet that makes up ViewState as a whole.&lt;/P&gt;
&lt;P&gt;It was a very excellent question, and in some quick searches I don't see any really clear topics dedicated to answering it, so I decided to answer it with a blog post rather than bury it at the bottom of 100 comments. You can read the comment &lt;A href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx#4743757" target=_blank mce_href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/03/Truly-Understanding-Viewstate.aspx#4743757"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;H1&gt;&amp;nbsp;&lt;/H1&gt;
&lt;H1&gt;&lt;U&gt;Page.RegisterRequiresPostBack&lt;/U&gt;&lt;/H1&gt;
&lt;P&gt;To understand why this method is needed, lets walk through what happens when you use an ImageButton. 
&lt;P&gt;When you click on an html element of the &amp;lt;input type=image&amp;gt; variety, what is added to the form collection sent to the server is not what a normal button sends. A normal button sends the key/value pair "id=value". But an image submit sends "id.x=##&amp;amp;id.y=##". It sends 2 values, the x and y coordinates of the location of the image you clicked. 
&lt;P&gt;This means the KEY of the submission will not match the ID of the control. Normally, ASP.NET matches keys to their control IDs, and is able to find the control directly with FindControl() (which also has the indirect effect of calling EnsureChildControls). But it won't find a control named "id.x" or "id.y", so that ImageButton will never be notified of the postback data it generated. 
&lt;P&gt;All is not lost! RegisterRequiresPostBack comes the rescue. It tells asp.net to notify the control of postback data regardless of whether the form collection contains an entry for it. ImageButton can now happily look for "id.x" and "id.y" in the form data, and raise its click event if it is found. 
&lt;P&gt;Now why is there a list of controls that call RegisterRequiresPostBack in ViewState of all places? Because when you call RegisterRequiresPostBack, you're doing so for the next request not the current one. You're saying, "when what I'm rendering right now is posted back, I want to be notified." So ASP.NET needs to maintain the list of controls in ViewState so it can do so on the next request. 
&lt;P&gt;Some people have complained that even when they disable ViewState for the entire page, they see ViewState in their page. This is one of the reasons for that. It is simply required for the controls to function, it cannot be turned off. 
&lt;H2&gt;&lt;U&gt;The humble CheckBox&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;Another control the calls RegisterRequiresPostBack is the humble CheckBox control. When you post a form, any checked checkboxes are added to the form collection with "id=value". However, and quite unfortunately if you ask me, unchecked checkboxes add &lt;EM&gt;NOTHING&lt;/EM&gt; to the form collection. 
&lt;P&gt;Ok -- so a CheckBox knows it is checked if its post data key exists, and unchecked if it is missing, right? Nope, sorry, that simply won't do. What would happen to a checkbox that is first created &lt;EM&gt;during a postback&lt;/EM&gt;? For example, a checkbox within a databound control that has just been databound? How does that CheckBox know whether it is unchecked or has just been born into the world, err, page? The only way to know the difference is RegisterRequiresPostBack. If not for that, all checkboxes first created during postbacks would always start off unchecked, even if they were databound or declared to be checked. 
&lt;H2&gt;&lt;U&gt;Homework&lt;/U&gt;&lt;/H2&gt;
&lt;P&gt;Open up reflector and find the Page.RegisterRequiresPostBack method. Use the analyzer to find all the controls that call it. Try to understand why each of them needs it. I assure you, they all have good but distinct reasons.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4745436" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ViewState/default.aspx">ViewState</category></item><item><title>Response.Redirect into a new window (with Extension Methods)</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/09/25/response-redirect-into-a-new-window-with-extension-methods.aspx</link><pubDate>Tue, 25 Sep 2007 18:01:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:4143558</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>41</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=4143558</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/09/25/response-redirect-into-a-new-window-with-extension-methods.aspx#comments</comments><description>&lt;P&gt;This question comes up from &lt;A href="http://forums.asp.net/t/1161626.aspx" target=_blank mce_href="http://forums.asp.net/t/1161626.aspx"&gt;time&lt;/A&gt; to &lt;A href="http://www.dotnet247.com/247reference/msgs/31/158269.aspx" target=_blank mce_href="http://www.dotnet247.com/247reference/msgs/31/158269.aspx"&gt;time&lt;/A&gt;, to &lt;A href="http://p2p.wrox.com/topic.asp?TOPIC_ID=11046" target=_blank mce_href="http://p2p.wrox.com/topic.asp?TOPIC_ID=11046"&gt;time&lt;/A&gt;. If you understand how redirects work, then you also know it is "not possible" to redirect into a new window, because a redirect on the server causes a special HTTP response to be sent to the users browser, the client. The browsers native implementation interprets the special response code and sends the user off to the destination. There's no built-in mechanism or standard for specifying a new window. &lt;/P&gt;
&lt;P&gt;The only way to open a new window is for it to be initiated on the client side, whether it be through script or clicking on a link.&lt;/P&gt;
&lt;P&gt;So the solution always proposed to this problem is to instead write out some script that opens the window, rather than using Response.Redirect:&lt;/P&gt;
&lt;DIV class=codeSample&gt;&lt;PRE style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;script&lt;/SPAN&gt; type&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;"text/javascript"&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(&lt;SPAN style="COLOR: gray"&gt;"foo.aspx"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;script&lt;/SPAN&gt;&lt;SPAN style="COLOR: gray"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Ok... so first you lecture me about how it is "not possible", and then you give me the code that makes it possible. Why can't I just redirect to a new window -- I don't care how HTTP works or client this or server that. There's obviously a solution, so why do I have to worry about it?&lt;/P&gt;
&lt;P&gt;(The make-believe developers in my head are always quite temperamental)&lt;/P&gt;
&lt;P&gt;It's easy enough to write a little helper that abstracts the details away from us... while we're at it, we might as well add 'target' and 'windowFeatures' parameters. If we're going to open the new window with script, why not let you use all of the window.open parameters? For example, with 'windowFeatures' you can specify whether the new window should have a menu bar, and what its width and height are.&lt;/P&gt;
&lt;DIV class=codeSample&gt;&lt;PRE style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: teal"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ResponseHelper&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt; Redirect(&lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; url, &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; target, &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; windowFeatures) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;HttpContext&lt;/SPAN&gt; context &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;HttpContext&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Current;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; ((&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(target) &lt;SPAN style="COLOR: aqua"&gt;||&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Equals(&lt;SPAN style="COLOR: gray"&gt;"_self"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;StringComparison&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;OrdinalIgnoreCase)) &lt;SPAN style="COLOR: aqua"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(windowFeatures)) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; context&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Response&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Redirect(url);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;else&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;Page&lt;/SPAN&gt; page &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; (&lt;SPAN style="COLOR: teal"&gt;Page&lt;/SPAN&gt;)context&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Handler;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; (page &lt;SPAN style="COLOR: aqua"&gt;==&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;null&lt;/SPAN&gt;) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;InvalidOperationException&lt;/SPAN&gt;(&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;"Cannot redirect to new window outside Page context."&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; page&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;ResolveClientUrl(url);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; script;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: aqua"&gt;!&lt;/SPAN&gt;&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(windowFeatures)) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;@"window.open(""{0}"", ""{1}"", ""{2}"");"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;else&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;@"window.open(""{0}"", ""{1}"");"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Format(script, url, target, windowFeatures);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;ScriptManager&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;RegisterStartupScript(page,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;typeof&lt;/SPAN&gt;(&lt;SPAN style="COLOR: teal"&gt;Page&lt;/SPAN&gt;),&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;"Redirect"&lt;/SPAN&gt;,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;true&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Now you just call ResponseHelper.Redirect, and it figures out how to honor your wishes. If you don't specify a target or you specify the target to be "_self", then you must mean to redirect within the current window, so a regular Response.Redirect occurs. If you specify a different target, like "_blank", or if you specify window features, then you want to redirect to a new window, and we write out the appropriate script.&lt;/P&gt;
&lt;P&gt;One nice side effect of this "do you really need a new window?" detection is that it's dynamic. Say the destination you redirect to is configurable by some administrator. Now they can decide whether it opens in a new window or not. If they don't want it to they can specify blank or _self as the target.&lt;/P&gt;
&lt;P&gt;Disclaimers:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: If you use it outside the context of a Page request, you can't redirect to a new window. The reason is the need to call the ResolveClientUrl method on Page, which I can't do if there is no Page. I could have just built my own version of that method, but it's more involved than you might think to do it right. So if you need to use this from an HttpHandler other than a Page, you are on your own.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: Beware of popup blockers.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: Obviously when you are redirecting to a new window, the current window will still be hanging around. Normally redirects abort the current request -- no further processing occurs. But for &lt;EM&gt;these&lt;/EM&gt; redirects, processing continues, since we still have to serve the response for the current window (which also happens to contain the script to open the new window, so it is important that it completes).&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;Extension Methods&lt;/H4&gt;
&lt;P&gt;Recently, &lt;A href="http://weblogs.asp.net/leftslipper/default.aspx" target=_blank rel=coworker mce_href="http://weblogs.asp.net/leftslipper/default.aspx"&gt;Eilon&lt;/A&gt; and &lt;A href="http://weblogs.asp.net/bleroy/default.aspx" target=_blank rel=coworker mce_href="http://weblogs.asp.net/bleroy/default.aspx"&gt;Bertrand&lt;/A&gt; blogged about a &lt;A href="http://weblogs.asp.net/bleroy/archive/2007/09/24/json-style-dictionary-parameters-in-c.aspx" target=_blank mce_href="http://weblogs.asp.net/bleroy/archive/2007/09/24/json-style-dictionary-parameters-in-c.aspx"&gt;novel use&lt;/A&gt; of some C# 3.0 features. Eilon posed &lt;A href="http://weblogs.asp.net/leftslipper/archive/2007/09/24/using-c-3-0-anonymous-types-as-dictionaries.aspx" target=_blank mce_href="http://weblogs.asp.net/leftslipper/archive/2007/09/24/using-c-3-0-anonymous-types-as-dictionaries.aspx"&gt;the question&lt;/A&gt;, "Have you come up with a novel way to use a new language feature that you'd like to share?". Well here you go.&lt;/P&gt;
&lt;P&gt;Extension Methods are a new feature in C# 3.0 (you'll need it for the rest of the article). They allow you to add methods to existing types, imported via a 'using' statement. I've seen a lot of debate over their use -- whether they are bad or good. Well -- I don't know, I don't really want to be involved in that debate. But I do know that in some scenarios they seem to fit perfectly. Like all language tools, you should use it sparingly and only when appropriate. I believe even the dreaded GOTO statement, which yes, exists in C#, has its place (I wasn't a believer originally, but some old coworkers of mine convinced me (Bob!)).&lt;/P&gt;
&lt;P&gt;In this case, an extension method seems to work well. In general, whenever you find yourself writing a static Helper class whose only purpose in life is to help use the APIs of another type, it's probably a great candidate for extension methods. Especially if the first parameter to all those methods is the type you're trying to help with -- or if the methods always grabs the instance through some static API (like HttpContext.Current) or instantiates a new one.&lt;/P&gt;
&lt;P&gt;By rewriting our ResponseHelper to use extension methods...&lt;/P&gt;
&lt;DIV class=codeSample&gt;&lt;PRE style="MARGIN: 0px"&gt;&lt;SPAN style="COLOR: teal"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;ResponseHelper&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;void&lt;/SPAN&gt; Redirect(&lt;SPAN style="COLOR: teal"&gt;this&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;HttpResponse&lt;/SPAN&gt; response,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; url,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; target,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; windowFeatures) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; ((&lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(target) &lt;SPAN style="COLOR: aqua"&gt;||&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Equals(&lt;SPAN style="COLOR: gray"&gt;"_self"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: teal"&gt;StringComparison&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;OrdinalIgnoreCase)) &lt;SPAN style="COLOR: aqua"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;String&lt;/SPAN&gt;&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(windowFeatures)) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Redirect(url);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;else&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Page page &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; (Page)HttpContext&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Current&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Handler;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; (page &lt;SPAN style="COLOR: aqua"&gt;==&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;null&lt;/SPAN&gt;) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;throw&lt;/SPAN&gt; &lt;SPAN style="COLOR: teal"&gt;new&lt;/SPAN&gt; InvalidOperationException(&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;"Cannot redirect to new window outside Page context."&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; page&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;ResolveClientUrl(url);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;string&lt;/SPAN&gt; script;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="COLOR: aqua"&gt;!&lt;/SPAN&gt;String&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;IsNullOrEmpty(windowFeatures)) {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;@"window.open(""{0}"", ""{1}"", ""{2}"");"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;else&lt;/SPAN&gt; {&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; &lt;SPAN style="COLOR: gray"&gt;@"window.open(""{0}"", ""{1}"");"&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script &lt;SPAN style="COLOR: aqua"&gt;=&lt;/SPAN&gt; String&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Format(script, url, target, windowFeatures);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ScriptManager&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;RegisterStartupScript(page,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;typeof&lt;/SPAN&gt;(Page),&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: gray"&gt;"Redirect"&lt;/SPAN&gt;,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; script,&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="COLOR: teal"&gt;true&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;PRE style="MARGIN: 0px"&gt;}&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;Note the 'this' keyword in the first parameter. Now whenever we include the namespace this class is defined within, we get a nice override on the actual Response object. &lt;/P&gt;
&lt;DIV class=codeSample&gt;&lt;A href="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/ResponseRedirect.jpg" mce_href="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/ResponseRedirect.jpg"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=54 alt=ResponseRedirect src="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/ResponseRedirect_thumb.jpg" width=552 border=0 mce_src="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/ResponseRedirect_thumb.jpg"&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;P&gt;Simply including a 'using' to a namespace is what gets extensions methods to show up. So it's probably a good idea to keep extension methods isolated to their own namespaces, lest someone get more than they bargained for when they use your namespace.&lt;/P&gt;
&lt;P&gt;Also worth noting is that this is still a static API, so you can use it the traditional way, too. You just have to pass in the Response object as the first parameter.&lt;/P&gt;
&lt;P&gt;And to see it in action...&lt;/P&gt;
&lt;DIV class=codeSample&gt;&lt;PRE style="MARGIN: 0px"&gt;Response&lt;SPAN style="COLOR: aqua"&gt;.&lt;/SPAN&gt;Redirect(&lt;SPAN style="COLOR: gray"&gt;"popup.aspx"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: gray"&gt;"_blank"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: gray"&gt;"menubar=0,width=100,height=100"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A href="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/PopupWindow.jpg" mce_href="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/PopupWindow.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=325 alt="Redirected into a new Window..." src="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/PopupWindow_thumb.jpg" width=464 border=0 mce_src="http://www.infinity88.com/images/blog/Res.RedirectintoanewwindowwithExtensionM_11108/PopupWindow_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4143558" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/JavaScript/default.aspx">JavaScript</category></item><item><title>Rendering ASP.NET Controls out of place</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/09/19/rendering-asp-net-controls-out-of-place.aspx</link><pubDate>Wed, 19 Sep 2007 15:00:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3962219</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=3962219</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/09/19/rendering-asp-net-controls-out-of-place.aspx#comments</comments><description>Two posts back I discussed a technique you can use to render controls in an order other than how they are physically arranged in the control tree. A reader, Winston Fassett, posted a comment asking for some advice on how to get a control to render into...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2007/09/19/rendering-asp-net-controls-out-of-place.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3962219" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Inline Script inside an ASP.NET AJAX UpdatePanel</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx</link><pubDate>Mon, 17 Sep 2007 23:29:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3920192</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>66</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=3920192</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx#comments</comments><description>When you wrap content with an UpdatePanel, it pretty much takes care of everything for you. But it can't do absolutely everything... Take for example some inline script: &amp;lt; p &amp;gt; Some html before the script &amp;lt;/ p &amp;gt; &amp;lt; script type = "text/javascript...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2007/09/17/inline-script-inside-an-asp-net-ajax-updatepanel.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3920192" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/AJAX/default.aspx">AJAX</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/HTML/default.aspx">HTML</category></item><item><title>Rendering ASP.NET Controls out of order</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/09/07/rendering-asp-net-controls-out-of-order.aspx</link><pubDate>Fri, 07 Sep 2007 22:48:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:3784860</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=3784860</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/09/07/rendering-asp-net-controls-out-of-order.aspx#comments</comments><description>I receive a lot of comments and emails stemming from my series of articles on understanding the nuances of dealing with dynamic controls . It's interesting that so many of these requests revolve around very similar problems. One such theme is where you...(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2007/09/07/rendering-asp-net-controls-out-of-order.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=3784860" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ViewState/default.aspx">ViewState</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/UI/default.aspx">UI</category></item><item><title>TRULY Understanding Dynamic Controls (Part 4)</title><link>http://weblogs.asp.net/infinitiesloop/archive/2007/09/04/TRULY-Understanding-Dynamic-Controls-_2800_Part-4_2900_.aspx</link><pubDate>Tue, 04 Sep 2007 23:50:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:673437</guid><dc:creator>InfinitiesLoop</dc:creator><slash:comments>165</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/infinitiesloop/rsscomments.aspx?PostID=673437</wfw:commentRss><comments>http://weblogs.asp.net/infinitiesloop/archive/2007/09/04/TRULY-Understanding-Dynamic-Controls-_2800_Part-4_2900_.aspx#comments</comments><description>Part 4 of my series on Truly Understanding Dynamic Controls in ASP.NET. This part covers two of the major scenarios in which you may be loading controls or user controls dynamically, and some of the posting, viewstate, and ID related issues you have probably ran into....(&lt;a href="http://weblogs.asp.net/infinitiesloop/archive/2007/09/04/TRULY-Understanding-Dynamic-Controls-_2800_Part-4_2900_.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=673437" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/infinitiesloop/archive/tags/ViewState/default.aspx">ViewState</category></item></channel></rss>