Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

module variables are not reset on asynchronous postback

Posted on 2009-07-14
3
Medium Priority
?
434 Views
Last Modified: 2012-05-07
Hi

I have some variables in a public module and they are not being reset when the page performs an asynchronous postback.

Do you have an idea why this is? If i cannot force them to be reset what variables could i access from a public function in a module that retain their values between successive function calls (within the same postback) but are definitely reset on an asynch postback

many thanks
0
Comment
Question by:andieje
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
NazoUK earned 2000 total points
ID: 24857232
If you're talking about a Visual Basic module then all variables are shared in scope which means they persist throughout the application. They are also shared between all users of the application so if one user performs an action that modifies the contents of the variable all other users will see the change as well.

From the sound of it modules aren't really appropriate for what you are doing, you should use define on the page that is using them.
0
 

Author Comment

by:andieje
ID: 24861116
Thanks for confirming that for me. What type of variable can i use from within a module (or somewhere where i am putting some shared code) that will be reset per page load. Thanks
0
 

Author Closing Comment

by:andieje
ID: 31603521
many thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question