⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pageproperties.cs

📁 Professional ASP.NET source code
💻 CS
字号:
using System;
using System.Collections;
using System.Xml;
using System.Configuration;
using System.Web.Configuration;

namespace Wrox {
  internal class PagePropertiesHandler : IConfigurationSectionHandler {
    public virtual object Create(Object parent, Object context, XmlNode node) {
      PagePropertiesConfig config = new PagePropertiesConfig((PagePropertiesConfig)parent);
      config.LoadValuesFromConfigurationXml(node);
      return config;
    }
  }

  public class PagePropertiesConfig {
    string	_backColor;

    internal PagePropertiesConfig(PagePropertiesConfig parent) {
      if (parent != null)
        _backColor = parent._backColor;
    }

    internal void LoadValuesFromConfigurationXml(XmlNode node) {
      //Exception error = null;
      XmlAttributeCollection attributeCollection = node.Attributes;
      _backColor = attributeCollection["backColor"].Value;
    }

    public string BackColor{
     get {return _backColor;}
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -