• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1234
  • Last Modified:

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?
0
ShreyaTrivedi
Asked:
ShreyaTrivedi
1 Solution
 
ShreyaTrivediAuthor Commented:
I got the solution:

HtmlTable t;
foreach (Control ctl in this.FindControl("form1").Controls)
{
            if (ctl is HtmlTable)
            {
                t = (HtmlTable)ctl;
            }
}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now