<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Kevin Castle</title><subtitle type="html" /><id>http://weblogs.asp.net/kevincastle/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kevincastle/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/kevincastle/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2009-01-29T21:34:00Z</updated><entry><title>Viewing Generated Source in IE7</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/kevincastle/archive/2009/01/29/viewing-generated-source-in-ie7.aspx" /><id>http://weblogs.asp.net/kevincastle/archive/2009/01/29/viewing-generated-source-in-ie7.aspx</id><published>2009-01-30T05:34:00Z</published><updated>2009-01-30T05:34:00Z</updated><content type="html">&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;</content><author><name>kevincastle</name><uri>http://weblogs.asp.net/members/kevincastle.aspx</uri></author><category term="IE7 AJAX Productivity" scheme="http://weblogs.asp.net/kevincastle/archive/tags/IE7+AJAX+Productivity/default.aspx" /></entry></feed>
