application-settings

How to retrieve web.config setting in web application subfolder

*爱你&永不变心* 提交于 2019-12-12 03:08:56
问题 I have a subfolder in my web application. It's not a separate application, just a subfolder, but it has its own web.config. There is an aspx page in that subfolder which needs to access a setting in the web.config file in its own folder. When I call ConfigurationManager.GetSection("settingname") from a static initializer on that aspx page, it returns null. Why might this happen? Could it be that my setting name is wrong or that the application root web.config is being accessed instead of the

How to access iPhone general accessibility settings with OS 4.0

℡╲_俬逩灬. 提交于 2019-12-11 23:39:49
问题 I want to access the general settings of iPhone. I know that it was not possible with os 3.0 and there on . But hope fully if apple has provided any API with os 4.0 or above to access the general settings like if I want to know whether device is in vibrate mode or Ringing mode as well as If I want to know whether my iPhone is having high brightness and If I want to set lower To access such kind of settings does apple provide ani API. If yes then please provide me the link. Thanks in advance

Referenced Class Library application settings in app.config are being used over ASP.NET MVC web.config's?

雨燕双飞 提交于 2019-12-11 15:38:30
问题 I am maintaining an ASP.NET MVC 4 project which references many Class Libraries that have their own app.config with settings managed through the Settings.settings UI. I have read many questions on Stack Overflow and recently this article and this SO question. It was my understanding that the Web.config of the web application in my MVC 4 project would be what all referenced projects would look at for the settings. You just have to make sure the same settings are specified in the main web

Handling application settings with ninject and convention based binding

荒凉一梦 提交于 2019-12-11 06:24:03
问题 I am using Ninject in an MVC3 application and am trying to switch over to conventions based binding with ninject.extensions.conventions. Now let's say I have a class that needs access to application settings such as: public class Foo : IFoo { public Foo(string connectionString) { ... } } I think I understand how to do normal binding with Ninject like this: Bind<IFoo>() .To<Foo>() .WithConstructorArgument( "connectionString", ConfigurationManager.ConnectionStrings["Default"].ConnectionString);

Reset part of application settings

懵懂的女人 提交于 2019-12-11 06:13:38
问题 So, I have Form called Preferences with TabControl in it. This TabControl contains several TabPages (General, Advanced, Misc, ...) with few comboboxes, checkboxes and labels. Each of this control inside TabPage is assigned Application Settings Property Binding (aka they show saved user settings, user can change them etc...). I know that there is a method to reset all settings ( Properties.Settings.Default.Reset(); ), but is there a way how to reset only settings inside one TabPage ? My

can not save application settings in .net 3.5

本小妞迷上赌 提交于 2019-12-11 04:45:15
问题 I am creating a application that store basic database connection info like host,user, password and default database name in application settings using User Scope. I am using .net 3.5 with Visual Studio 2008 I put 4 text boxes in a user control and bound their text property to the application settings individual properties. // // textBox_database // this.textBox_database.Location = new System.Drawing.Point(103, 101); this.textBox_database.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);

Can I save an object to the app.config file?

不羁的心 提交于 2019-12-11 03:28:30
问题 I need to use a config file for my application which will save a list of details for each entity: for example- <person A> <name= > <age= > <person B> <name=> <age= > is something of this sort possile in the settings class or this requires using the app.config file wihtout the settings class wrapper? Edit: My application used to have a single entity, now it should support multiple entities and therefore save multiple entities in some config. 回答1: Yes, you can save any sort of information

How to access configs from autoloaded config files in a layout / view script in Zend Framework 2?

独自空忆成欢 提交于 2019-12-10 22:25:38
问题 I would like / have to manage some settings in ZF1 style and provide the view with the infomation about the current environment. /config/application.config.php return array( ... 'module_listener_options' => array( ... 'config_glob_paths' => array('config/autoload/{,*.}{global,local}.php') ) ); /config/autoload/env.local.php return array( // allowed values: development, staging, live 'environment' => 'development' ); In a common view script I can do it over the controller, since the

Change Outlook settings using VSTO

混江龙づ霸主 提交于 2019-12-10 17:47:04
问题 I have just spent about 4 hours trying to figure out how to retrieve/set outlook settings for Microsoft Outlook 2010 programmatically. What i mean by 'settings' is settings under the File/Options/Mail. What i am trying to do is to retrieve a list of settings set by the user, automate a whole print process that we need to run daily on some messages and then restore the settings. to their original. I have noticed that in Word the code below can be used to set certain settings through Word

Iterate through settings files

妖精的绣舞 提交于 2019-12-10 17:03:52
问题 I'm currently working on a VSTO project for which I have 5 .settings files: Settings.settings (Default) s201213.settings s201314.settings s201415.settings s201516.settings Over time there will be more settings files included following the same naming convention ('s' followed by a tax year). I know I can iterate through a settings file, but is there a way to iterate through the actual settings files themselves? I've tried things such as: public void Example() { System.Collections.IEnumerator