473,466 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to query App.config?

3 New Member
Here's my App.config file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="customers">
<section name="test1"
type="System.Configuration.DictionarySectionHandle r" />
<section name="test2"
type="System.Configuration.DictionarySectionHandle r" />
</sectionGroup>
</configSections>

<appSettings>
<add key="ConnectionString" value="some value here" />
</appSettings>

<customers>
<test1>
<add key="CustCode" value="0001" />
<add key="FtpHost" value="ftp://xxx.com" />
<add key="FtpAccount" value="user1" />
<add key="FtpPassword" value="password1" />
<add key="Active" value="Y" />
</test1>
<test2>
<add key="CustCode" value="0002" />
<add key="FtpHost" value="ftp://yyy.com" />
<add key="FtpAccount" value="user2" />
<add key="FtpPassword" value="password2" />
<add key="Active" value="Y" />
</test2>
</customers>
</configuration>

If I know the 'CustCode' value (such as "0001"), how can I retrieve all the
other values for 'test1'?
I appreciate your help! Thank you.
Aug 17 '07 #1
1 1481
Plater
7,872 Recognized Expert Expert
Pl ease don't double post:
http://www.thescripts.com/forum/thread694341.html
Aug 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
A very strange bug. www.monkeyclaus.org is run by a cms I'm developing. One of types of users we allow is "justTestingTheSite", a type of user I developed to give demo's to prospective clients. The...
10
by: ensnare | last post by:
Hey everyone -- I currently have a table friends: member_id (int 10), connect_id (int 10), active (char 1) which contains friend relationships. When active is set to 1, the relationship...
2
by: ensnare | last post by:
This query is running REAL slow ... like 1.2 secs ... any ideas on how I could optimize it? Perhaps my indexes are incorrect? $this->query = "SELECT m.username as username, e.title as title,...
3
by: jeremy | last post by:
Hello. I have an asp.net application that resides on a non-DC / BDC Sharepoint Server (although it is logged into the domain). The application will perform lookups based on the current user...
1
by: Sean C. | last post by:
Helpful folks, I have recently migrated our test server, which runs Win NT 4, from V7.2 FP11 to V8.1.3. Just about everything works wondefully, except I am having major problems getting the...
9
by: Mark | last post by:
I've run a few simple tests looking at how query string encoding/decoding gets handled in asp.net, and it seems like the situation is even messier than it was in asp... Can't say I think much of the...
18
by: A.M | last post by:
Hi, Is there any way to call a WSS web service method by using browser and see the XML result in browser as well? I have been told that there is query string syntax for calling...
1
by: johnpremi | last post by:
Hi there, I have to pass a query string parameter in my Web Config for loading a URL. We have two environments (production and devlopment) and MonitorURL needs to be changed when the deployment is...
2
by: dsdevonsomer | last post by:
Hello, I have one simple query joining two tables with left outer join on 3 fields and using MIN on two fields. These two tables have lot of data about 3 mil in total. I am trying to migrate db...
5
by: lisles | last post by:
i have a page funtion.php which hs the function to connect to the db /* Mysql Connection */ function connect(){ global $db_server,$db_user,$db_pass,$db;//Global Values from the config.php...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.