can you kindly help me load my gridview with data from appsetings.xml . the gridview must have the following three columns(key,value and description)

here is my appsettings.xml.

<?xml version="1.0"?>
    <FromEmail value="test@uiplay.com"
               description="From Email Address Name" />
    <AdminEmail value="cmckowen@gmail.com"
                description="Admin Email Used for Admin Test and Unsubscribe Comments" />
    <!--<Connection value="server=localhost;database='PolicyNet';uid='sa';pwd='sa123!'"
                description="Default Database Connection String" />-->
    <!--<Connection value="server=wormwood;database='PolicyNet';uid='PolicyNetTest';pwd='PNet123!'"
                description="Default Database Connection String" />-->
    <Connection value="server=;database='PolicyNetTest';uid='PolicyNetTest';pwd='PNet123!'"
                description="Default Database Connection String" />
    <!-- -->
    <AllowManualStoredProcedureExecution value="false"
                                         description="allow execution of stored procedures from outside data classes (bad practice!)" />
    <SqlPath value="Data/sql"
             description="Path to the XML Query Files"/>
    <EncryptionData value="(rS06BeTdkbD9TB9RUWQWESvsJUs+kw82wcTlN2e+8NBAB87CPkT/gl3sDQnh4NbjhzQJB36h6KTNX80HeQHnNw==)"
                    description="Encryption data" />
      <SmtpServer value="" description="SMTP Server Used By Newsletter Application" />
        <Username value="Ronelle@UIPLAY" description="Username for LogicSms" />
        <Password value="wong2fu" description="Password for LogicSms" />
      <DelayedResponseHandler.Timeout value="50000"
                                      description="Timeout for DelayedResponseHandler" />
        <FromEmail value="test@uiplay.com"
                   description="Address used as from field for newsletters" />
        <UnsubscribeLinkFormat value="http://localhost:100/index.aspx?PageKey=Unsubscribe&amp;Id=[:ContactId:]"
                               description="Url used to unsubrscribe a contact" />

  <PayinDueDay value="24"
               description="Day by which Pay-ins should be entered." />

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

8 Years
Discussion Span
Last Post by owenshiri

i have tried using the ReadXml method already but it seems as if the dataset is splitting the apsettings.xml data into 24 tables whilst i want it in a single table with three columns.

here is the code

public static DataSet GetDataSet()
            var ds = new DataSet();
           return ds;

bt after debugging, the method returns ds with 24 tables

Edited by __avd: Added [code] tags. Encase your code in: [code] and [/code] tags.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.