Solved

module variables are not reset on asynchronous postback

Posted on 2009-07-14
3
431 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
NazoUK earned 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Suggested Courses

738 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