Pages

Tuesday, November 22, 2011

Get XML node and node attribute value

XmlDocument webConfig = new XmlDocument();
        webConfig.Load(HttpContext.Current.Server.MapPath(@"~\web.config"));
        XmlNode node = webConfig.SelectSingleNode("/configuration/system.web/authentication/forms");
        node.Attributes["timeout"].Value;

        node.Value;

       

No comments:

Post a Comment