473,471 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using Application.Settings at run time

I want to be able to load up the items collection of a combobox with
string values I create in Application settings. I have created a
collection of strings in the Settings window, but I am unable to bind
it to the "items" member of a combobox because that member is not
available in ApplicationSettings of the properties window. I thought it
should be easy to bind the combo box at run time, but I can't seem to
find any way to do this.

Am I going about this the right way? What my goal here is, is to be
able to use this like I used the app.config file "back in the day" to
be able to seperate settings that can change over time from the code.
This way, I can simply edit an XML file to change values rather than
needing to recompile and re-distribute the entire application.

Thanks for any help,

Arthur Autenzio (ar*************@bostonstock.com)

Mar 3 '06 #1
2 7623
Hi,
<au******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I want to be able to load up the items collection of a combobox with
string values I create in Application settings. I have created a
collection of strings in the Settings window, but I am unable to bind
it to the "items" member of a combobox because that member is not
available in ApplicationSettings of the properties window. I thought it
should be easy to bind the combo box at run time, but I can't seem to
find any way to do this.
you should be able to bind it to AppSettings liek this:

foreach( string _value in ConfigurationSettings.AppSettings )

you could not decide which are from the particular key that you want though.
Am I going about this the right way? What my goal here is, is to be
able to use this like I used the app.config file "back in the day" to
be able to seperate settings that can change over time from the code.
This is the way to go right now too
This way, I can simply edit an XML file to change values rather than
needing to recompile and re-distribute the entire application.


But why you want to bind it to a combobox in the first place?
remember htat the config file cannot be changed in the code.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Mar 3 '06 #2
Thanks for the reply Ignacio, but this didn't help. I can't believe
that something as basic as this is so difficult to figure out!!

What I eventually figured out is that once you create a settings object
that contains some application settings, you can access their values at
runtime like this - namespce.Settings1.Default."setting name"

Microsoft - you should be ashamed for your lame documentation! Thanks
for changing the way one can use an app.config file and leaving it up
to us to figure out the new method.

Mar 6 '06 #3

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

Similar topics

6
by: Andrzej | last post by:
Used to read newsgroup for answers, now have to ask for them as well. I have an application (C#, .NET 1.1) that connects to local db on MSDE 2000 SP3a (using ADO from MDAC 2.71) on one side and...
1
by: David Veeneman | last post by:
How do I persist properties bound to application settings in the VS 2005 Designer? I am binding form and control properties to application settings using VS 2005, as explained in MSDN: ...
0
by: Luther Hert | last post by:
I solved my problem, but I am not sure whether or not I understand how I arrived at the solution. I leraned about and checked: IIS> creating virtual directories> configuring web extensions >...
6
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain...
4
by: Frank Walsh | last post by:
Hi, I'm experiencing a problem when my asp.net 1.1 application starts. It appears that when the application has not been used for 12 hours or so...I experience a much longer load time then if...
4
by: Lars Netzel | last post by:
I just saw this program called Handy Backup 4.5 where you can add backup jobs as such... and I wonder where you normally save data in an application. I come from an ASP world and have started to...
3
by: Mirek Endys | last post by:
Hello all, I have this problem. I have a windows service and I would like to put there Settings for starting this service. Because of this service is running under NETWORK_SERVICE account, what...
3
by: xycos | last post by:
Hello. I apologize for asking this question as the information I need is availible via the MSDN library, however I cannot seemt o understand what I need to do, so I'm asking here. I have created...
6
by: TS | last post by:
I cannot get this to work. I added an app.config to a project i reference from my web application project (vs 05) but can see no way to access the settings within it. the other thing is that I...
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
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
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
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
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
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,...
1
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: 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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.