示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                HttpResponse   Response = context.Response;
                PortalSettings ps       = PortalController.GetCurrentPortalSettings();

                Response.ContentType     = "text/xml";
                Response.ContentEncoding = Encoding.UTF8;

                var builder = new SitemapBuilder(ps);

                if ((context.Request.QueryString["i"] != null))
                {
                    // This is a request for one of the files that build the sitemapindex
                    builder.GetSitemapIndexFile(context.Request.QueryString["i"], Response.Output);
                }
                else
                {
                    builder.BuildSiteMap(Response.Output);
                }
            }
            catch (Exception exc)
            {
                Exceptions.Exceptions.LogException(exc);
            }
        }
示例#2
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                HttpResponse Response = context.Response;
                PortalSettings ps = PortalController.Instance.GetCurrentPortalSettings();

                Response.ContentType = "text/xml";
                Response.ContentEncoding = Encoding.UTF8;

                var builder = new SitemapBuilder(ps);

                if ((context.Request.QueryString["i"] != null))
                {
                    // This is a request for one of the files that build the sitemapindex
                    builder.GetSitemapIndexFile(context.Request.QueryString["i"], Response.Output);
                }
                else
                {
                    builder.BuildSiteMap(Response.Output);
                }
            }
            catch (Exception exc)
            {
                Exceptions.Exceptions.LogException(exc);
            }
        }
        private void BindProviders()
        {
            var builder = new SitemapBuilder(PortalSettings);

            grdProviders.DataSource = builder.Providers;
        }