473,405 Members | 2,421 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,405 software developers and data experts.

where to set a development variable?

In my windows apps I always set a global development variable so that I can
toggle certain blocks of code back and forth between production and
development settings. I'll run some startup code that sets something like
DevVar = TRUE or DevVar = FALSE and then do this in code where needed:

If DevVar Then
....do something
ELSE
... do something else
END IF
I have no idea where to set something like (web.config, some global vb code
unit???) that in an asp.net 2.0 app and what it would be (session var??).
Looking for any advice.

Thanks,

Keith
Mar 6 '08 #1
3 929
"Keith G Hicks" <kr*@comcast.netwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
Looking for any advice.
http://www.google.co.uk/search?hl=en...ation%22&meta=
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Mar 6 '08 #2
This is pretty much what I was looking for:

<configuration>
<!-- application specific settings -->
<appSettings>
<add key="connString" value="connection string" />
</appSettings>

<system.web>
...
</system.web>
</configuration>"Keith G Hicks" <kr*@comcast.netwrote in message
news:#z*************@TK2MSFTNGP04.phx.gbl...
In my windows apps I always set a global development variable so that I
can
toggle certain blocks of code back and forth between production and
development settings. I'll run some startup code that sets something like
DevVar = TRUE or DevVar = FALSE and then do this in code where needed:

If DevVar Then
....do something
ELSE
... do something else
END IF
I have no idea where to set something like (web.config, some global vb
code
unit???) that in an asp.net 2.0 app and what it would be (session var??).
Looking for any advice.

Thanks,

Keith


Mar 6 '08 #3
"Keith G Hicks" <kr*@comcast.netwrote in message
news:OK*************@TK2MSFTNGP06.phx.gbl...
>In my windows apps I always set a global development variable so that I
can
toggle certain blocks of code back and forth between production and
development settings. I'll run some startup code that sets something like
DevVar = TRUE or DevVar = FALSE and then do this in code where needed:

If DevVar Then
....do something
ELSE
... do something else
END IF

This is pretty much what I was looking for:

<configuration>
<!-- application specific settings -->
<appSettings>
<add key="connString" value="connection string" />
</appSettings>

<system.web>
...
</system.web>
OK, but that's actually not what you asked for... You asked for a method to
use a variable to toggle *blocks of code*, and even gave an example of it,
which is why I gave you the Google link for articles on how to do
conditional compilation in ASP.NET...

If you are now saying that you want to be able to use, essentially,
different web.configs for development / production etc, then you need this:
http://weblogs.asp.net/scottgu/archi...-released.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Mar 6 '08 #4

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

Similar topics

4
by: William Tasso | last post by:
hello one and all an extract from global.asa Sub Application_OnStart Application("Server") = lcase(Request.ServerVariables("SERVER_NAME")) End Sub returns error "Element not found."
0
by: Steven Kelly | last post by:
For those going to XP 2005 (Sheffield, UK, June 18-23) and interested in modeling, the following workshop may be of interest: Agile Development with Domain Specific Languages Scaling up Agile -...
3
by: Joachim Klassen | last post by:
Hi all, up to DB2 V7 for Windows there was a DB2 Registry Variable DB2_BDINFO, which showed (amongst other things) the process id of the corresponding db2syscs.exe process for the instance. In...
1
by: Zri Man | last post by:
Procedure Get_RowCount works fine when called independently. When called from Another procedure it gives the following error. SQL0206N "C" is not valid in the context where it is used....
1
by: Ken | last post by:
Hello, I am trying to learn how to build a localizable windows application and am having trouble getting alternate languages to display when if stop hardcoding the culture settings. The line...
23
by: gord | last post by:
As a complete novice in the study of Python, I am asking myself where this language is superior or better suited than others. For example, all I see in the tutorials are lots of examples of list...
41
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
6
by: DT | last post by:
Hello, I'm writing php extension to read php.ini settings from independent location, particularly some object or relational database, or, sleepycat db. PHP ini development concept seems pretty...
43
by: Kislay | last post by:
Which of the following is correct regarding the storage of global variables : 1. Global variables exist in a memory area that exists from before the first reference in a program until after the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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,...

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.