<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.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>Custom Server Controls</title><link>http://forums.asp.net/19.aspx</link><description>All about building ASP.NET server controls. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=12&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>How to make a Collection of WebControls as a property of a non-rendering control</title><link>http://forums.asp.net/thread/2274978.aspx</link><pubDate>Thu, 03 Apr 2008 18:28:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2274978</guid><dc:creator>LKB</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2274978.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=19&amp;PostID=2274978</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m working on a suite of controls to be used for easy database communication.&amp;nbsp; I&amp;#39;ve got a master control that handles all the connection properties and command building and then I have a bunch of controls which inherit from standard web controls like TextBox and Label.&amp;nbsp; The master control needs to be able to refer to the controls which it needs to build its select and update commands, but I&amp;#39;m having trouble finding a way here that works.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I&amp;#39;ve tried having a collection of the controls, but the only way I can get this to work is if the master control handles all rendering.&amp;nbsp; This doesn&amp;#39;t work out so well because there are often a number of controls on a page that don&amp;#39;t tie out to the database.&amp;nbsp; Anything else results in copies of the controls in the list that don&amp;#39;t update when the user enters values.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried just keeping a list of the control IDs but I&amp;#39;m having trouble getting a reliable reference to them from within the master class that way.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any suggestions on a better method?&lt;/p&gt;</description></item></channel></rss>