473,566 Members | 2,958 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 NameValueSectio nHandler
and SingleTagSectio nHandler. How can I get the child list of that
sectionGroup? Is there any build-in functions like
ConfigurationSe ttings.GetConfi g("")? Or I need to write a function to find
the child node?

For example, the app.config
<sectionGroup name="table1">
<section name="connectio n"
type="System.Co nfiguration.Nam eValueSectionHa ndler" />
<section name="col1" type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
<section name="col2" type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
<section name="col3" type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
</sectionGroup>

<table1>
<connection>
<add key="tablename" value="table1" />
<add key="connection string" value="Persist Security Info=False;Inte grated
Security=False; Connect Timeout=30;serv er=localhost;da tabase=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="nvarchar 1" 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 1327

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

Similar topics

1
2244
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 custom dialog box (example: right click an item and bring up a Config/Properties dialog of the selected item). In a Windows app, I can add a...
4
4558
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 adding to the child collection, eg: parent.Children.Add(child); child.Parent = parent;
4
3319
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" type="App.HttpHandlers.ThreeDeepPage, App" /> <add verb="*" path="/files/*/*/*.aspx" type="App.HttpHandlers.TwoDeepPage, App" /> </httpHandlers>
1
1042
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 consolidate all the http modules for all the child apps and have them fire up whether they are needed or not. -- John Dalberg
3
8685
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 possible elements expected: 'assemblies, buildProviders, codeSubDirectories, expressionBuilders'. Here's what the web config looks like. The error...
10
3999
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 application. What should happen, is that the main MDI form should close, taking the child forms with it. There is code to loop through the child forms,...
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 ConfigurationSettings.GetConfig("")? Or I need to write a function to find the child node? For example, the app.config <sectionGroup...
5
2002
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 changing its constructor. how to? #include <string> #include <vector> #include <iostream>
1
7311
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 NameValueCollection. Here is some sample code: ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap(); fileMap.ExeConfigFilename =...
0
7673
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7893
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
926
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.