title: c# winforms control loop method in asp.net
body: <p>I got this method in winforms c# which work perfect . But i can't figure it out that how to make this method exactly same for asp.net webpages . 
  Any little help would be appreciated .</p>
  
  <pre><code>public static void rat(Form x)
      {
          Form myForm = x;
          foreach (Control c in myForm.Controls)
          {
              if (c.Name != "ctn" &amp;&amp; !(c is Label))
              {
                  c.Enabled = !(c.Enabled);
              }
          }
      }
  </code></pre>