C# 如何查找iframe asp.net中的所有控件
如何查找.aspx页面和iframe asp.net中的所有控件id和文本 例如C# 如何查找iframe asp.net中的所有控件,c#,asp.net,iframe,C#,Asp.net,Iframe,如何查找.aspx页面和iframe asp.net中的所有控件id和文本 例如 public static Control FindControlRecursive(this Control control, string id) { if (control == null) return null; //try to find the control at the current level Control ctrl = control.FindControl(id
public static Control FindControlRecursive(this Control control, string id)
{
if (control == null) return null;
//try to find the control at the current level
Control ctrl = control.FindControl(id);
if (ctrl == null)
{
//search the children
foreach (Control child in control.Controls)
{
ctrl = FindControlRecursive(child, id);
if (ctrl != null) break;
}
}
return ctrl;
}
以上方法通过提供id来帮助。。。。
我需要找到.aspx和iframe控件id和文本
我怎样才能得到它。。。
谢谢