Esempio n. 1
0
        public static bool GetEnableHtmRewrite()
        {
            XmlDocument  doc          = SiteUrls.GetDoc();
            XmlNode      xmlNode      = doc.SelectSingleNode("SiteUrls");
            XmlAttribute xmlAttribute = xmlNode.Attributes["enableHtmRewrite"];

            return(string.Compare(xmlAttribute.Value, "true", true) == 0);
        }
Esempio n. 2
0
        private static void UpdateHtmRewrite(string status)
        {
            XmlDocument  doc          = SiteUrls.GetDoc();
            XmlNode      xmlNode      = doc.SelectSingleNode("SiteUrls");
            XmlAttribute xmlAttribute = xmlNode.Attributes["enableHtmRewrite"];

            if (string.Compare(xmlAttribute.Value, status, true) != 0)
            {
                xmlAttribute.Value = status;
                doc.Save(SiteUrls.GetSiteUrlsFilename());
            }
        }