473,405 Members | 2,344 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.

n00b Question

I'm pretty new to ASP.NET programming and web programming in general,
but I've been a client/server programmer for several years now (which
is definately making things more difficult for me). I've got a project
developed in ASP.NET designed, for the most part, the way that I would
design a client/server app. As light a front end as I can make, and
the real workhorse code in the back end. What I'm running in to is
that sometimes (and I can't really nail this down) my variables are not
re-initializing in between runs. In the dev env., I might set a
boolean value, stop the project, re-run, and check the value
immediately, and it's the old value, not the re-initialized variable.
The only major thing that I can think of is that the variables that
aren't re-initialize are in modules, rather than page level variables.
Could they be not unloading properly/at all? Is this normal? Is there
any way for me to change this behavior if that is the case?

Thanks

Nov 19 '05 #1
1 1039
If you set a value on the server then it may well be available at the next
page request, as the server runtime holds the value not your application.
To drop all variables then you would need to restart the web application,
not the application (the pages) that you are coding.

However this is all dependent on how you load and store your variables. Try
to stay away from static variables, or modules holding variables that are
loading at anything but page level as these are likey to remain in scope on
the web server even though you have stopped your page equest.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"Ambush" <am******@gmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I'm pretty new to ASP.NET programming and web programming in general,
but I've been a client/server programmer for several years now (which
is definately making things more difficult for me). I've got a project
developed in ASP.NET designed, for the most part, the way that I would
design a client/server app. As light a front end as I can make, and
the real workhorse code in the back end. What I'm running in to is
that sometimes (and I can't really nail this down) my variables are not
re-initializing in between runs. In the dev env., I might set a
boolean value, stop the project, re-run, and check the value
immediately, and it's the old value, not the re-initialized variable.
The only major thing that I can think of is that the variables that
aren't re-initialize are in modules, rather than page level variables.
Could they be not unloading properly/at all? Is this normal? Is there
any way for me to change this behavior if that is the case?

Thanks

Nov 19 '05 #2

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

Similar topics

1
by: Matt | last post by:
I'd like to overwrite just one line of a binary file, based on a position set by seek(). Is there no way to do this? As far as I can tell I need to read the whole file, change the line, and write...
3
by: Anupam Kapoor | last post by:
hi all, a python n00b, so please bear with me. i have a simple question: i generally name python sources as a-simple-python-example.py. when i try to import a module named as above, i...
4
by: turnstyle | last post by:
Hey all, sorry for asking such a grunt question, and thanks in advance for any help... My hosting ISP offers access to their MS-SQL database, and my understanding is that it's generally simplest...
15
by: Anton Gavrilov | last post by:
Hi all, I seek your advice on where to start if I want to write a compiler for a toy C-like language I invented (or, rather, am in the process of inventing). Yes, yes, I know I'm crazy and the...
1
by: newgenre | last post by:
I am using a pre-built package of code for my site, which is called EasyDisc. All it does is it creates an interactive forum on your site, like any forum you see anywhere. I am having a problem...
4
by: onefry | last post by:
Hey I have this prog that i'm working on, starting my first c++ class and kind of a n00b to programming here it is #include <iostream> #include <cstdlib> using namespace std;
6
by: Charles | last post by:
I am learning from the Accelerated C++ book. The following example doesn't work and I don't know why: #include <iostream> #include <string> int main () { const std::string exclam = "!"; const...
3
by: rtlshred | last post by:
Hello I have just, just started C++ programing. the complier I am using is Dev C++ Here is my question: Once I have written some code, How do I run the program and see the output?
2
by: benwah1983 | last post by:
Greetings, Here is my problem: The following code shows a div with two small nested divs (images with a title), then the div is closed. Another one opens and a "random text" is displayed. <div...
4
by: ig | last post by:
First off, I'm a python n00b, so feel free to comment on anything if I'm doing it "the wrong way." I'm building a discrete event simulation tool. I wanted to use coroutines. However, I want to know...
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...
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
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...
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,...
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.