473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ConfigurationSettings.GetConfig .Net 2.0 equivalent

Hi

Anyone know the equivalent to

NameValueCollection nvc = ConfigurationSettings.GetConfig(
"SectionGroup/Section" ) as NameValueCollection;

in .Net 2.0. All the examples I've seen involve creating a customer
handler.

Surely there's still a simple way of obtaining key/pair values, but I just
can't seem to find it.

Thanks

Glenn
Jun 1 '06 #1
2 6443
*custom, although the idea of a customer handler is intriguing.
"Glenn" <gl*********@yahoo.co.uk> wrote in message
news:ew**************@TK2MSFTNGP05.phx.gbl...
Hi

Anyone know the equivalent to

NameValueCollection nvc = ConfigurationSettings.GetConfig(
"SectionGroup/Section" ) as NameValueCollection;

in .Net 2.0. All the examples I've seen involve creating a customer
handler.

Surely there's still a simple way of obtaining key/pair values, but I just
can't seem to find it.

Thanks

Glenn

Jun 1 '06 #2
Easy really, once the hangovers gone.

NameValueCollection nvc = ConfigurationManager.GetSection(
"SectionGroup/Section" ) as NameValueCollection;
string value = nvc.Get( "Key" )

"Glenn" <gl*********@yahoo.co.uk> wrote in message
news:ew**************@TK2MSFTNGP05.phx.gbl...
Hi

Anyone know the equivalent to

NameValueCollection nvc = ConfigurationSettings.GetConfig(
"SectionGroup/Section" ) as NameValueCollection;

in .Net 2.0. All the examples I've seen involve creating a customer
handler.

Surely there's still a simple way of obtaining key/pair values, but I just
can't seem to find it.

Thanks

Glenn

Jun 1 '06 #3

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

Similar topics

3
by: serge calderara | last post by:
Dear all, I have define a configuration file for my application with different section groups and settings belonging to each individual group like as follow : ...
0
by: Keith Patrick | last post by:
If I call ConfigurationSettings.GetConfig(...) the first time, it works fine, demanding no permissions. However, if I call it again for a different section, it demands FileIOPermission...
3
by: Filippo | last post by:
Hi there, I am writing a Windows App and need a Configuration file. I wonder if I can use the WEB.CONFIG file to store my values. I also wonder if I can use the ConfigurationSettings.AppSettings...
9
by: james | last post by:
According to the documentation ConfigurationSetting.GetConfig( string ) is used to get user defined config settings. Yet, no matter how I try to add my own sections to the app.config I keep...
2
by: Mythran | last post by:
public static void Main() { string sectionName = "system.web"; object settings = ConfigurationSettings.GetConfig(sectionName); Console.WriteLine( settings == null ? "(null)" :...
2
by: J Holsinger | last post by:
In VB.Net solution I have Standard Windows app and a Web app that references a Class library. Both the Win app and the class library use the same technique in the code files for retrieving...
0
by: Steph | last post by:
hello, in .NET1 i used this command for read a specific xml file config: ConfigurationSettings.GetConfig how to make in .NET 2 ? keep in mind : i need to read a specific file not the wep.config...
8
by: Mark | last post by:
Could someone provide me with details or a link on how the line of code executes underneath the hood? Assume it's executed in an ASP.NET application. string blah =...
1
by: Ken | last post by:
I'm currently using 1.1. Is there any way using the value of a ConfigurationSettings.AppSettings as a key of ConfigurationSettings.AppSettings.Tosting( )]? for example in web.config <add...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.