Accessing <table> tag in code-behind file

I have created a webpage using <table> tag. I want to iterate through the rows <tr> of this table from code-behind. How can I access this <table> tag from code-behind?
ShreyaTrivediAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
ShreyaTrivediConnect With a Mentor Author Commented:
I got the solution:

HtmlTable t;
foreach (Control ctl in this.FindControl("form1").Controls)
{
            if (ctl is HtmlTable)
            {
                t = (HtmlTable)ctl;
            }
}
0
All Courses

From novice to tech pro — start learning today.