<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Toars &#187; DataPager</title>
	<atom:link href="http://www.toars.com/tag/datapager/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.toars.com</link>
	<description>I will smile to the world ^o^</description>
	<lastBuildDate>Fri, 06 May 2011 08:50:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to access the sub controls in the PagerTemplate in DataPager .NET control</title>
		<link>http://www.toars.com/2009/09/how-to-access-the-sub-controls-in-the-pagertemplate-in-datapager-net-control/</link>
		<comments>http://www.toars.com/2009/09/how-to-access-the-sub-controls-in-the-pagertemplate-in-datapager-net-control/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:36:26 +0000</pubDate>
		<dc:creator>Xin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DataPager]]></category>

		<guid isPermaLink="false">http://www.toars.com/?p=339</guid>
		<description><![CDATA[At least for me, I can not use MyDataPage.FindControl("LblPage") to find my LblPage control in the PagerTemplate. I have to use an recursive way to locate it. public static Control FindControlRecursive(Control container, string id) { if (container.ID == id) return container; foreach (Control control in container.Controls) { Control foundControl = FindControlRecursive(control, id); if (foundControl != [...]]]></description>
			<content:encoded><![CDATA[<p>At least for me, I can not use MyDataPage.FindControl("LblPage") to find my LblPage control in the PagerTemplate.</p>
<p>I have to use an recursive way to locate it.</p>
<pre>        public static Control FindControlRecursive(Control container, string id)
        {
            if (container.ID == id)
                return container;

            foreach (Control control in container.Controls)
            {
                Control foundControl = FindControlRecursive(control, id);

                if (foundControl != null)
                    return foundControl;
            }

            return null;
        }</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.toars.com/2009/09/how-to-access-the-sub-controls-in-the-pagertemplate-in-datapager-net-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

