473,566 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Substitution variables in App.Config?

EJ
Is there a way to specify a substitution variable that can be used in
several places in the app.config file (like you can do in Ant/NAnt
build files)? For example, if there is part of a file path that I
specify in several of the appSettings key values, can I somehow specify
that path once, and just insert a substitution variable of some sort
(e.g., "${path}") and have it get substituted at run-time? I could
just separate them into different keys and handle it in code, but this
path is being set on a key in a custom configuration section for a
third-party component (log4net), so this is not possible. Also, I
tried to do this using XML Entities to no avail. Please advise.

Nov 17 '05 #1
0 1377

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

Similar topics

1
1915
by: Phil Hancey | last post by:
I am trying to write a small function to display a recordset in tabular form. I want to define a row only once but then display the relevant data for each row but I got "undefined variable" when I tried the following: I do not necessarily want to display all fields in a recordset so my row might look like this $row =...
6
1949
by: Paddy | last post by:
Hi, I got tripped up on the way eval works with respect to modules and so wrote a test. It seems that a function carries around knowledge of the globals() present when it was defined. (The .func_globals attribute)? When evaluated using eval(...) the embedded globals can be overridden with
0
1774
by: Justin | last post by:
Hi, First off, I must apologise for cross posting. I am having difficulty creating a pdf document using perl cgi to do substitution for multiline pdf form fields. I created a pdf template/file with substitution variables. The file is then read and variables substituted using pattern matching. When I view the pdf multiline form field using...
1
5138
by: Jacob Grydholt Jensen | last post by:
I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of problems with the substitution variables. My understanding was that they behave as in SQL*Plus, but my experiments beg to differ. I log on to the sample schema 'hr' and enter the following statements: -- statements begin set verify on define name = K%
0
1587
by: EJ | last post by:
Is there a way to specify a substitution variable that can be used in several places in the app.config file (like you can do in Ant/NAnt build files)? For example, if there is part of a file path that I specify in several of the appSettings key values, can I somehow specify that path once, and just insert a substitution variable of some sort...
4
12070
by: Ian | last post by:
Hi, Hopefully a simple question but my brain is hurting... I want to make a regex substitution, using search and replace patterns contained in variables. What I want to do is: $f = "fred.abc"; $f =~ s/(.*)\.abc/$1.def/; print "$f\n";
7
6619
by: MtiPaulo | last post by:
I know FoxPro has excellent macro substitution but I am trying to find through MS Access. Wondering if MS Access has Macro Substitution? I will give you my basic example. In FoxPro Language Code For i = 1 to 5 strCmd = "Client" + Alltrim(Str(i)) + "=" + Alltrim(Str(i)) &strCmd && Client1 = 1 Next
3
5605
by: Skip | last post by:
OK, I'm a novice in JS but have lots of coding experience. I am trying to accomplish something that would seem somewhat simple - BUT IT'S NOT. I have a basic window that calls another window with window.open and passes in 1 value using a querystring i.e., www.myhome.com/mypage?video=BAK-Extension Now when the window opens, I can capture...
9
2815
by: Justin Voelker | last post by:
I have a configuration file that contains the host, username, password, and database name required for any database connections. The config file runs through a few if/then/else statements to determine if the website is local or remote and if it is local if it is the test site or "live" site then it sets the 4 variables. I am trying to...
4
2363
by: icarus | last post by:
global_vars.py has the global variables set_var.py changes one of the values on the global variables (don't close it or terminate) get_var.py retrieves the recently value changed (triggered right after set_var.py above) Problem: get_var.py retrieves the old value, the built-in one but not the recently changed value in set_var.py. What...
0
7584
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
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
8108
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
5484
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
3643
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
2083
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
1201
muto222
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.