XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath,"web.config"));
XmlNode node = xmlDocument.SelectSingleNode("");
if (node!= null)
{
m_MaxLength = Convert.ToInt32(node.Value);
}
转载于:https://www.cnblogs.com/xinzhuangzi/archive/2009/09/12/4100721.html