473,498 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get the child list of a sectionGroup in app.config

In app.config, I create a sectionGroup which includes NameValueSectionHandler
and SingleTagSectionHandler. How can I get the child list of that
sectionGroup? Is there any build-in functions like
ConfigurationSettings.GetConfig("")? Or I need to write a function to find
the child node?

For example, the app.config
<sectionGroup name="table1">
<section name="connection"
type="System.Configuration.NameValueSectionHandler " />
<section name="col1" type="System.Configuration.SingleTagSectionHandler " />
<section name="col2" type="System.Configuration.SingleTagSectionHandler " />
<section name="col3" type="System.Configuration.SingleTagSectionHandler " />
</sectionGroup>

<table1>
<connection>
<add key="tablename" value="table1" />
<add key="connectionstring" value="Persist Security Info=False;Integrated
Security=False;Connect Timeout=30;server=localhost;database=a;User
ID=a;Password=a;" />
<add key="selectsql" value="Select * From table1" />
</connection>
<col1 field="char1" type="char" length="5" />
<col2 field="varchar1" type="varchar" length="10" />
<col3 field="nvarchar1" type="nvarchar" length="50" />
</table1>

How can I get the child node sectionGroup "table1"?? I want to retrive the
following list: connection, col1, col2, col3.

Thanks.
Jul 21 '05 #1
0 1316

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

Similar topics

1
2228
by: Tomas Vera | last post by:
Hello All, I'm working on a web app that will simulate a Windows app. One of the items that I've trouble reproducing is the parent/child interaction that might occur between a windo and popup...
4
4543
by: Danny Tuppeny | last post by:
Hi all, I've been trying to write some classes, so when I have a parent-child relationship, such as with Folders in my application, I don't have to remember to add a parent reference, as well as...
4
3312
by: Grant Harmeyer | last post by:
How would I set up an httpHandler so that it would only apply to certain child directories of the application? I.E: <httpHandlers> <add verb="*" path="/files/*/*/*/*.aspx"...
1
1038
by: John Dalberg | last post by:
It seems I can't define http modules in the web.config files of child applications. They need to be in the web.config of the parent app. Is there any way around this? Because this means I have to...
3
8670
by: Robert | last post by:
I have a number of web projects converted from 1.1 to 2.0 in VS2005. I am methodically seeing the error below: The element 'compilation' has invalid child element 'compilers'. List of...
10
3980
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
397
by: Joyce | last post by:
In app.config, I create a sectionGroup which includes NameValueSectionHandler and SingleTagSectionHandler. How can I get the child list of that sectionGroup? Is there any build-in functions like...
5
1994
by: cmk128 | last post by:
Hi In the following code, when you create a object of class child, parent class (class mother) will hold a reference. But i want every class derived from mother class has this ability without...
1
7290
by: Dave | last post by:
I'm access a non default application config file with OpenMappedExeConfiguration() and it works great for "appSettings" values, but I cannot get it to work for configSection values / with...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7168
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,...
1
6891
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
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
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
4595
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
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
293
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.