Reputation: 17447
which is similar in c# ?
var e = document.getElementsByName("test")[0];
var HTML = e.innerHTML;
Upvotes: 0
Views: 340
Reputation: 931
Recursive FindControl method:
private Control RecursiveControlFind(Control parent, string controlID)
{
Control child = parent.FindControl(controlID);
if (child == null)
{
if (parent.Controls.Count > 0)
{
foreach (Control nestedControl in parent.Controls)
{
child = RecursiveControlFind(nestedControl, controlID);
if (child != null)
break;
}
}
}
return child;
}
Upvotes: 2