<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ASP.net Weird Bug</title>
	<atom:link href="http://you.arenot.me/2010/07/20/asp-net-weird-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/</link>
	<description>A blog by Colin Wiseman</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:30:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Per</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-672</link>
		<dc:creator>Per</dc:creator>
		<pubDate>Mon, 22 Nov 2010 13:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-672</guid>
		<description>Thank you!
I went with tomb&#039;s solution and added . It is a really stupid bug however, pity Microsoft won&#039;t seem to fix it :(.</description>
		<content:encoded><![CDATA[<p>Thank you!<br />
I went with tomb&#8217;s solution and added . It is a really stupid bug however, pity Microsoft won&#8217;t seem to fix it <img src='http://you.arenot.me/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-505</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Wed, 13 Oct 2010 08:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-505</guid>
		<description>Cheers tomb, but that&#039;s more work than I would like.  I would have to remember to add &lt;%=Environment.NewLine%&gt; each time, or the &#160;, and my memory is already fading away...stoopid booze!</description>
		<content:encoded><![CDATA[<p>Cheers tomb, but that&#8217;s more work than I would like.  I would have to remember to add < %=Environment.NewLine%> each time, or the &nbsp;, and my memory is already fading away&#8230;stoopid booze!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomb</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-487</link>
		<dc:creator>tomb</dc:creator>
		<pubDate>Wed, 06 Oct 2010 19:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-487</guid>
		<description>I solved the problem by adding &lt;%=Environment.NewLine%&gt; where the whitespace should go. Then the output behaves as I expected. You could probably also add a whitespace char and it would do the same trick. Cheers</description>
		<content:encoded><![CDATA[<p>I solved the problem by adding &lt;%=Environment.NewLine%&gt; where the whitespace should go. Then the output behaves as I expected. You could probably also add a whitespace char and it would do the same trick. Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-313</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Tue, 20 Jul 2010 09:21:10 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-313</guid>
		<description>I really should have had a bunch of preview buttons :D

Yeah that&#039;s a fair point Neil, that shows that within the placeholder, it&#039;s predictable behaviour - anything with runat inside a placheholder will have the whitespacing around it removed.  

However it&#039;s a bit annoying that only the &lt;b&gt;asp:placeholder&lt;/b&gt; that does this.  the &lt;b&gt;asp:panel&lt;/b&gt; doesn&#039;t do that.  It should be the same for all controls.

If you are building a large web app with different developers working on it, then you could get inconsistencies in style due to something like this, unless you updated your CSS to make it work in all possibilites - with and without whitespace.  

I know some developers that don&#039;t like using &lt;b&gt;float: left&lt;/b&gt; to often in their css, as it causes it&#039;s own set of problems!

Cheers for the info lads :)  Still annoying though :P</description>
		<content:encoded><![CDATA[<p>I really should have had a bunch of preview buttons <img src='http://you.arenot.me/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Yeah that&#8217;s a fair point Neil, that shows that within the placeholder, it&#8217;s predictable behaviour &#8211; anything with runat inside a placheholder will have the whitespacing around it removed.  </p>
<p>However it&#8217;s a bit annoying that only the <b>asp:placeholder</b> that does this.  the <b>asp:panel</b> doesn&#8217;t do that.  It should be the same for all controls.</p>
<p>If you are building a large web app with different developers working on it, then you could get inconsistencies in style due to something like this, unless you updated your CSS to make it work in all possibilites &#8211; with and without whitespace.  </p>
<p>I know some developers that don&#8217;t like using <b>float: left</b> to often in their css, as it causes it&#8217;s own set of problems!</p>
<p>Cheers for the info lads <img src='http://you.arenot.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Still annoying though <img src='http://you.arenot.me/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil B</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-312</link>
		<dc:creator>Neil B</dc:creator>
		<pubDate>Tue, 20 Jul 2010 09:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-312</guid>
		<description>Sorry .. that should have read:

&lt;code&gt;Some Text&lt;/code&gt;

Or of the above doesn&#039;t work ... add the runat=&quot;server&quot; to the p element

p.s.  you need a &lt;i&gt;Preview&lt;/i&gt; button</description>
		<content:encoded><![CDATA[<p>Sorry .. that should have read:</p>
<p><code>Some Text</code></p>
<p>Or of the above doesn&#8217;t work &#8230; add the runat=&#8221;server&#8221; to the p element</p>
<p>p.s.  you need a <i>Preview</i> button</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil B</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-311</link>
		<dc:creator>Neil B</dc:creator>
		<pubDate>Tue, 20 Jul 2010 09:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-311</guid>
		<description>I think it&#039;s more to do with whether the control is run at the server or not, rather than it being an input control.  If you change the paragraph to Some text the white space round it is no longer preserved.</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s more to do with whether the control is run at the server or not, rather than it being an input control.  If you change the paragraph to Some text the white space round it is no longer preserved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-310</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Tue, 20 Jul 2010 08:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-310</guid>
		<description>Ah see that starts to make a bit of sense, William, however, I would say that a webform itself is a collection of controls.  And most of the time you will have a &lt;form runat=&quot;server&quot; /&gt; in there with a bunch of controls.  Why does it preserve whitespace inside the form server control, but not the placeholder?

Change the placeholder into a asp:panel, and again the whitespace is preserved...ARGH!!!

Now add &lt;p&gt;Some text&lt;/p&gt; with whitespace above and below.  Why does it preserve that whitespace...ARGH!!!

So it&#039;s only the placeholder control that doesn&#039;t preserver white space around input controls...any other control or markup it preserves the whitespace...ARGH!!!!</description>
		<content:encoded><![CDATA[<p>Ah see that starts to make a bit of sense, William, however, I would say that a webform itself is a collection of controls.  And most of the time you will have a &lt;form runat=&#8221;server&#8221; /&gt; in there with a bunch of controls.  Why does it preserve whitespace inside the form server control, but not the placeholder?</p>
<p>Change the placeholder into a asp:panel, and again the whitespace is preserved&#8230;ARGH!!!</p>
<p>Now add &lt;p&gt;Some text&lt;/p&gt; with whitespace above and below.  Why does it preserve that whitespace&#8230;ARGH!!!</p>
<p>So it&#8217;s only the placeholder control that doesn&#8217;t preserver white space around input controls&#8230;any other control or markup it preserves the whitespace&#8230;ARGH!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-309</link>
		<dc:creator>William</dc:creator>
		<pubDate>Tue, 20 Jul 2010 08:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-309</guid>
		<description>Wierd problem Colin, nicely answered Neil. That&#039;s one subtle behaviour. We all know that there is no concept of characters in the control heirarchy, every control when compiled gets its literal text converted into a literal control, so the behaviour must stem from this.</description>
		<content:encoded><![CDATA[<p>Wierd problem Colin, nicely answered Neil. That&#8217;s one subtle behaviour. We all know that there is no concept of characters in the control heirarchy, every control when compiled gets its literal text converted into a literal control, so the behaviour must stem from this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-308</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Tue, 20 Jul 2010 08:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-308</guid>
		<description>AHHHHH!!!!  Now that&#039;s really even more annoying.  And their reasoning is bollox!

&lt;i&gt;&quot;Thank you for the report, this is actually intentional. Placeholder is not normally user in markup like this, it is essentially a &#039;marker&#039; within a page... &quot;&lt;/i&gt;

PS I never even noticed the difference between the whitespace being there and not being there, as FireBug lays out your Html nicely for you if it can.</description>
		<content:encoded><![CDATA[<p>AHHHHH!!!!  Now that&#8217;s really even more annoying.  And their reasoning is bollox!</p>
<p><i>&#8220;Thank you for the report, this is actually intentional. Placeholder is not normally user in markup like this, it is essentially a &#8216;marker&#8217; within a page&#8230; &#8220;</i></p>
<p>PS I never even noticed the difference between the whitespace being there and not being there, as FireBug lays out your Html nicely for you if it can.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil B</title>
		<link>http://you.arenot.me/2010/07/20/asp-net-weird-bug/comment-page-1/#comment-307</link>
		<dc:creator>Neil B</dc:creator>
		<pubDate>Tue, 20 Jul 2010 08:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://you.arenot.me/?p=305#comment-307</guid>
		<description>There is actually a difference in the rendered HTML, or at least the white-space.  The line break after each button which exists in the first version is what leads to the spacing.  Remove the line break and you see the same spacing as the buttons in the place holder.

It&#039;s a common misconception that white-space makes no difference in HTML, but there are occasional when line breaks and spaces can change make noticeable differences in the layout.

The ASP Placeholder removes the white space which shouldn&#039;t be necessary, which is what is leading to the difference.

&lt;a href=&quot;http://connect.microsoft.com/VisualStudio/feedback/details/386790/placeholder-does-not-preserve-whitespace&quot; rel=&quot;nofollow&quot;&gt;Looks like Microsoft say this is intentional&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>There is actually a difference in the rendered HTML, or at least the white-space.  The line break after each button which exists in the first version is what leads to the spacing.  Remove the line break and you see the same spacing as the buttons in the place holder.</p>
<p>It&#8217;s a common misconception that white-space makes no difference in HTML, but there are occasional when line breaks and spaces can change make noticeable differences in the layout.</p>
<p>The ASP Placeholder removes the white space which shouldn&#8217;t be necessary, which is what is leading to the difference.</p>
<p><a href="http://connect.microsoft.com/VisualStudio/feedback/details/386790/placeholder-does-not-preserve-whitespace" rel="nofollow">Looks like Microsoft say this is intentional</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

