473,563 Members | 2,916 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 1326

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
2001
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
7885
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
8106
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
7638
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
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
3642
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
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 we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
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.