Solved

module variables are not reset on asynchronous postback

Posted on 2009-07-14
3
428 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 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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