title: having trouble clearing textboxes
body: <p>i want to clear all textboxes. wrote the public function as:</p>
  
  <pre><code>public void clean(Control parent)
  {
      try
      {
          foreach (Control c in parent.Controls)
          {
              TextBox tb = c as TextBox; //if the control is a textbox
              if (tb != null)//Will be null if c is not a TextBox
              {
                  tb.Text = String.Empty;//display nothing
              }
          }
      }
      catch (Exception ex)
      {
          Console.WriteLine("{0} Exception caught.", ex);
      }
  }
  </code></pre>
  
  <p>in the class of the page i want it to be called i declared:</p>
  
  <pre><code>PublicFunctions pubvar = new PublicFunctions();
  </code></pre>
  
  <p>and i call it as </p>
  
  <pre><code>pubvar.clean(Page);
  </code></pre>
  
  <p>but its not working... not even throwing an error... and my textboxes arent clearing... help?</p>