public static void ListRoutes(HttpResponse Response) { RouteCollection routes = RouteTable.Routes; Collection <RouteBase> List = routes; var table = new XElement("table", new XElement("tr" , new XElement("th", "Route.Defaults") , new XElement("th", "Route.Url") )); table.Add(List.Select(item => new XElement("tr" , new XElement("td", item is Route ? ParseDefaults((item as Route).Defaults) : "-") , new XElement("td", ObjectConvert.GetValue <string>(item, "Url")) ))); Response.Write(new XElement("br")); table.Save(Response.OutputStream); }