.Net C# write out all the controls that appear on your page. Web.

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Accessibility;public partial class _Default : System.Web.UI.Page{

{
protected void Page_Load(object sender, EventArgs e)// Start Examning all the ControlsDisplayControl(Page.Controls, 0);
Response.Write(
 
 
}
 

{

{
"<hr /");private void DisplayControl(ControlCollection controls, int depth)foreach (Control control in controls)// Use the depth paramater to indent the control tree.Response.Write(
new String('-', depth * 4) + "> ");// Display this controlResponse.Write(control.GetType().ToString() +
control.ID +

{
DisplayControl(control.Controls, depth + 1);
}

}
}
 
}
" - <b>" +"</b><br />");if (control.Controls != null)

Comments

Popular posts from this blog

Umbraco Razor Sort Nodes Ascending or Descending

Umbraco Razor get Querystring

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco