Hello,
my company hosts many websites, and we want to add a Feedback Form
(like "Contact Us") that can be re-used on all of them just by
"dropping in" a new directory containing the code. My boss told me to
make it as modular as possible, and to make it a control we can just
drag on to a page. Then he went on vacation for a week. :)
I have been reading about web.config files, and thought I could
utilize one to contain the few items that will be site specific (like
where the style sheet is, and a few different questions unique to a
particular Feedback Form) which I could stick in the "AppSetting s"
area of a "web.config " that I put in the directory containing the rest
of my code. That is, I was hoping to not have to modify each site's
Web.config, but instead employ my own in my own folder.
Yes, I am new to ASP.NET, and could be mis-interpreting things, but
the book I have been reading did make it seem like this was possible.
But I do not see how to do it. When I try to put my own web.config in
my own directory, it seems to be ignored. Or maybe I just don't know
the way to access its "AppSetting s" keys which I have defined?
Thanks for any help that you can provide.
Matt G.
PS: I am using Visual Studio and programming this in C#. 1 3034
Matt,
web.config is read at the application root folder level. So if you have a
subfolder that has your subfolder containing additional pages/ code and it is
not marked as an Application in IIS, then the web.config from the folder
above it will take precedence. You can however specify a file= atribute in
the main web.config's appSettings section and it will read your custom
appSettings as long as the file= attribute correctly points to your settings
include file.
See here for a short article on same: http://www.eggheadcafe.com/tutorials...-configur.aspx
--Pete
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com
"ma********@hot mail.com" wrote:
Hello,
my company hosts many websites, and we want to add a Feedback Form
(like "Contact Us") that can be re-used on all of them just by
"dropping in" a new directory containing the code. My boss told me to
make it as modular as possible, and to make it a control we can just
drag on to a page. Then he went on vacation for a week. :)
I have been reading about web.config files, and thought I could
utilize one to contain the few items that will be site specific (like
where the style sheet is, and a few different questions unique to a
particular Feedback Form) which I could stick in the "AppSetting s"
area of a "web.config " that I put in the directory containing the rest
of my code. That is, I was hoping to not have to modify each site's
Web.config, but instead employ my own in my own folder.
Yes, I am new to ASP.NET, and could be mis-interpreting things, but
the book I have been reading did make it seem like this was possible.
But I do not see how to do it. When I try to put my own web.config in
my own directory, it seems to be ignored. Or maybe I just don't know
the way to access its "AppSetting s" keys which I have defined?
Thanks for any help that you can provide.
Matt G.
PS: I am using Visual Studio and programming this in C#.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: will taubin |
last post by:
i would like my program to have a config.php with passwords and other
stuff.
i would like to have a functions.php to hold all my functions.
i would like the functions.php to include/require the config.php as it
will need it for database stuff.
i cant seem to get the functions in my functions.php to see the
variables in config.php
|
by: Jeffrey Palermo [MCP] |
last post by:
I use web.config files in many directories, and my aspx files can access the
AppSettings.
If I have a subdirectory Foo with an aspx, and Foo has a local web.config
that defines an AppSetting. My aspx in the Foo directory can properly
access this local AppSetting. I understand that web.config files are
cumulative as you go deep into the directory structure.
Here is my situation.
I have an aspx in the root of my application. I have a...
|
by: Luis Esteban Valencia |
last post by:
Hi,
I want in debug mode debug=true. In release (production), no reason debug to
be true but the questions are:
1. Does it slow the application (holding debug=true)
2. If yes, how can I solve the problem so that in debug mode debug=true and
in realse debug=true. To hold 2 separate files - seems not so good idea
Additional question: is there any correlation between debug in web.config
|
by: John Wildes |
last post by:
hello
I was wondering if someone could point me in the direction of information on
using app.config to store string variables.
I have a couple of variables that store path information for file creation
and output, and i would like to store the paths in the app.config and have
them read into variables that are declared as strings. I have only been
able to use the app.config to store information that is associated with
dynamic...
|
by: Lopamudra |
last post by:
Hi,
I have a doubt:
Any key defined in the "appsettings" section of the web.config file is
global to the application. Each time the web.config is changed, the
application restarts.
Both together, doesnt it make more sense to create variables to hold values
of these settings in the global.asax itself and store them in application
variables. This way the extra burden of creating them over and over again is
| |
by: mocsoft |
last post by:
I have an application that requires the dynamic changing of values in
the web.config file, I have code that seems to change the value:
WebConfigurationManager.AppSettings("database") =
DropDownList1.SelectedValue
However this seems to hold the value in IIS memory rather than actually
changing the stored text in the web.config file.
Does anyone know how I could change the value in the file permenantly
|
by: Griff |
last post by:
Hi
Bit confused about how to read a connection string from my web.config...I
need to hold this data in a particular section (v2.0 specific).
Extract from web.config:
-------------------------------------
<configuration>
<configSections>
|
by: teo |
last post by:
I put some variables in a web.config file
I have a global.asax file that needs to use
one of those variables
How can global.asax read that value?
If I have more than one web.config file,
how can the global.asax detect the right web.config file ?
|
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= |
last post by:
This has been working perfectly for months. Since we switched from ASP.NET
1.1 to 2.0, we have constant and sporadic issues with updating our
applications.
Touching the web.config works about 40% of the time to cause an AppDomain to
reload and flush all assemblies. Sometimes it works perfectly, but other
times some Assemblies are not reloaded into the AppDomain, even after
multiple web.config file touches. Sometimes multiple versions...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |