title: How to find a HtmlGenericControl using a Class
body: <p>I'm trying to figure out how to find a "div" which is in my main .aspx page from a class, is this possible? If so how? I've tried the code below but is not working</p>
  
  <pre><code>HtmlGenericControl step1 = (HtmlGenericControl)Page.FindControl("step1")
  </code></pre>
  
  <p>I know this is the way I would do it in the code behind file but in this case I want to do it from a class file.</p>
  
  <p>Thank you in advance.</p>
  
  <p>Basically what I'm trying to accomplish is this, I have multiple divs in my page all of the have runtat="server" visible="false" when certain criteria is met I want to be able to change the visible="true". I have this scenario in multiple pages so I want to be able to create a Class and check for the conditions there and through this way make the div visible or un-visible</p>