Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@ -0,0 +1,27 @@
using System;
using System.Web;
namespace XmlSiteMapProviderBug
{
public class CustomXmlSitemapProvider : XmlSiteMapProvider
{
public override SiteMapNode FindSiteMapNode(string rawUrl)
{
SiteMapNode node = base.FindSiteMapNode(rawUrl);
if (node != null)
{
System.Web.UI.Page page = HttpContext.Current.Handler as System.Web.UI.Page;
if (page != null)
{
page.Title = node.Title;
}
return node;
}
else
{
return base.RootNode;
}
}
}
}

View File

@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%= AppDomain.CurrentDomain.GetData ("BEGIN_CODE_MARKER") %><asp:SiteMapPath runat="server" id="sitemap" RenderCurrentNodeAsLink="true" /><pre runat="server" id="log" /><%= AppDomain.CurrentDomain.GetData ("END_CODE_MARKER") %>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder ();
TraverseChildren (sb, sitemap, String.Empty);
log.InnerText = sb.ToString ();
}
void TraverseChildren (StringBuilder sb, Control top, string indent)
{
foreach (Control c in top.Controls) {
sb.AppendFormat ("\t{0} [{1}]\r\n", c.GetType (), c.UniqueID);
TraverseChildren (sb, c, indent + "\t");
}
}
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<siteMap defaultProvider="CustomXmlSitemapProvider" enabled="true">
<providers>
<add name="CustomXmlSitemapProvider" type="XmlSiteMapProviderBug.CustomXmlSitemapProvider, App_Code" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
<compilation debug="true" />
</system.web>
</configuration>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode url="Default.aspx" title="Main">
<siteMapNode url="Default.aspx?mode=foo" title="Foo" />
<siteMapNode url="Default.aspx?mode=bar" title="Bar" />
</siteMapNode>
</siteMap>