using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.XML;
public partial class ReadWriteConfig : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
Read();
}
}
private void Read()
{
string filename = Server.MapPath("") + @"\App_Data\webconfig.XML";
XmlDocument xmldoc = new XMLDocument();
XMLdoc.Load(filename);
XmlNodeList topM = XMLdoc.DocumentElement.ChildNodes;//獲取與aPPSettings同級的結點
foreach (XMLElement element in topM)
{
if (element.Name == "aPPSettings")
{
XMLNodeList node = element.ChildNodes;
if (node.Count > 0)
{
DropDownList1.Items.Clear();
foreach (XMLElement el in node)
&