<?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>Kevin Castle</title><link>http://weblogs.asp.net/kevincastle/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Viewing Generated Source in IE7</title><link>http://weblogs.asp.net/kevincastle/archive/2009/01/29/viewing-generated-source-in-ie7.aspx</link><pubDate>Fri, 30 Jan 2009 05:34:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6868978</guid><dc:creator>kevincastle</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/kevincastle/rsscomments.aspx?PostID=6868978</wfw:commentRss><comments>http://weblogs.asp.net/kevincastle/archive/2009/01/29/viewing-generated-source-in-ie7.aspx#comments</comments><description>&lt;P&gt;One of the most frustrating things that I've found in developing/debugging in IE is that you can only view the page source which was initially rendered with the first page load. This was acceptable a couple of years ago, but is really a huge limitation utilizing AJAX (and I'm not just referring to UpdatePanel's).&lt;/P&gt;
&lt;P&gt;Of course you can &lt;A href="http://www.chapter31.com/2006/12/04/viewing-ajax-generated-source-code/" mce_href="http://www.chapter31.com/2006/12/04/viewing-ajax-generated-source-code/"&gt;view generated source with Firefox&lt;/A&gt; but what are you supposed to do when debugging any newly inserted client side script and/or viewing dynamically added markup? After searching around I found that you can simply copy and past the following script into the browsers address bar and it will open a new window with the pages currently generated source.&lt;/P&gt;
&lt;P&gt;javascript:void(window.open("javascript:document.open(\"text/plain\");document.write(opener.document.body.parentNode.outerHTML)"))&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_6.png" mce_href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_6.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=25 alt=image src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb_2.png" width=498 border=0 mce_src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;You can also add this to your IE favorites or add it to your Links toolbar so that its always one click away.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_2.png" mce_href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=66 alt=image src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb.png" width=184 border=0 mce_src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I cannot tell you how much this saved me this last week when I was using eval() to dynamically add script elements to the page's header. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_8.png" mce_href="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=128 alt=image src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb_3.png" width=244 border=0 mce_src="http://weblogs.asp.net/blogs/kevincastle/WindowsLiveWriter/ViewingGeneratedSourceinIE7_C804/image_thumb_3.png"&gt;&lt;/A&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6868978" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/kevincastle/archive/tags/IE7+AJAX+Productivity/default.aspx">IE7 AJAX Productivity</category></item></channel></rss>
