finding all the HtmlInputCheckBox controls with master.pages with recursion
<p>I thought this would work. But it's not working.  It's never getting inside of if (c is HtmlInputCheckBox)</p>

<pre><code>private string GetAllCheckBoxes(ControlCollection controls)
{
    StringBuilder sb = new StringBuilder();

    foreach (Control c in controls)
    {
        if (c.HasControls())
        {
            GetAllCheckBoxes(c.Controls);
        }
        else
        {
            if (c is HtmlInputCheckBox)
            {
                CheckBox cb = c as CheckBox;
                if (cb.Checked)
                {                                
                    sb.Append(cb.ID + "_1");                                
                }
                else
                {
                    sb.Append(cb.ID + "_0");
                }
            }
        }
    }
    return sb.ToString();

}
</code></pre>

<p>update: c is throwing somesort of error. </p>

<pre><code>Parent = {InnerText = '((System.Web.UI.HtmlControls.HtmlContainerControl)(((System.Web.UI.HtmlControls.HtmlGenericControl)(c.Parent)))).InnerText' threw an exception of type 'System.Web.HttpException'}
</code></pre>
