<?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"
	>
<channel>
	<title>Comments on: Getting rid of the Naming Container in asp.net 2.0</title>
	<atom:link href="http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/</link>
	<description></description>
	<pubDate>Fri, 21 Nov 2008 10:10:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Andy M</title>
		<link>http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-10889</link>
		<dc:creator>Andy M</dc:creator>
		<pubDate>Thu, 20 Mar 2008 14:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-10889</guid>
		<description>I love this approach, although I'm not looking forward to duplicating all of the standard form controls just to circumvent the naming container "feature".

My question though, in my simple tests I seem to lose access to the Text property and ViewState on postback when using my TextBox control in a ContentPlaceHolder on a MasterPages page, have you experienced this as well?</description>
		<content:encoded><![CDATA[<p>I love this approach, although I&#8217;m not looking forward to duplicating all of the standard form controls just to circumvent the naming container &#8220;feature&#8221;.</p>
<p>My question though, in my simple tests I seem to lose access to the Text property and ViewState on postback when using my TextBox control in a ContentPlaceHolder on a MasterPages page, have you experienced this as well?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: glJakaL</title>
		<link>http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-5376</link>
		<dc:creator>glJakaL</dc:creator>
		<pubDate>Thu, 11 Oct 2007 09:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-5376</guid>
		<description>Joshua: When overriding the NamingContainer property, we are removing the parent-child relationship that is used by asp.net to determine the ID of an object. So, if we have these controls on a webform:
&lt;ul&gt;[contentplaceholder]&lt;ul&gt;[UserControl]&lt;ul&gt;[TextBox]&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;
Normally, the name of the generated textbox will be "ctl00$ContentPlaceHolder1$UserControl1$TextBox1".
If we override the NamingContainer peroperty of the UserControl, we'll get "UserControl1$TextBox1". This is because (from asp.net's point of view) UserControl1 is no more a child of ContentPlaceHolder1, but it's still the parent of TextBox1!
So, in brief, yes you have to override all the low-level controls you use (TextBoxes, HiddenFields, DropDownLists...).</description>
		<content:encoded><![CDATA[<p>Joshua: When overriding the NamingContainer property, we are removing the parent-child relationship that is used by asp.net to determine the ID of an object. So, if we have these controls on a webform:</p>
<ul>[contentplaceholder]</ul>
<ul>[UserControl]</ul>
<ul>[TextBox]</ul>
<p>Normally, the name of the generated textbox will be &#8220;ctl00$ContentPlaceHolder1$UserControl1$TextBox1&#8243;.<br />
If we override the NamingContainer peroperty of the UserControl, we&#8217;ll get &#8220;UserControl1$TextBox1&#8243;. This is because (from asp.net&#8217;s point of view) UserControl1 is no more a child of ContentPlaceHolder1, but it&#8217;s still the parent of TextBox1!<br />
So, in brief, yes you have to override all the low-level controls you use (TextBoxes, HiddenFields, DropDownLists&#8230;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Barker</title>
		<link>http://www.gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-5375</link>
		<dc:creator>Joshua Barker</dc:creator>
		<pubDate>Wed, 10 Oct 2007 21:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://gljakal.com/blog/2007/09/12/getting-rid-of-the-naming-container-in-aspnet-20/#comment-5375</guid>
		<description>Does this also override the naming for any controls nested under this control (ie, can I just make this change to the one top-level parent control, and all child controls will do the same, or do I have to create a new class for every control type on my page?</description>
		<content:encoded><![CDATA[<p>Does this also override the naming for any controls nested under this control (ie, can I just make this change to the one top-level parent control, and all child controls will do the same, or do I have to create a new class for every control type on my page?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
