Hello,
I want to get the name of the aspx form which is placed inside a master page. I have the following code where I am passing the name of the page as parameter. But my code is returning the null since ctlEnumerator.Current is showing the master page name. What
changes should I do in my code to get the form name? Thanks in advance.
rivate HtmlForm __getHtmlForm(System.Web.UI.Page page)
{
IEnumerator ctlEnumerator = page.Controls.GetEnumerator();
while (ctlEnumerator.MoveNext())
{
object curr = ctlEnumerator.Current;
if (curr is HtmlForm)
{
return ((HtmlForm)curr);
}
}
return null;
}
Go to the complete details ...