Re: Question about data persistence in Public variables

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



KJ,

Thank you for the reply. I think your not following what I am stating. I am
talking about ASP.NET code. It is my understanding ASP.NET is not in itself
stateful thus when you go from one asp page to another page your variables
need to be re-addressed to memory spaces. Session and/or Cache is used to
hold information on the IIS server from page to page. You need to assign the
Session/Cache data back into a declared variable in order to access it.
That is my understanding but it is not what I am seeing.

Steps to duplicate what I am seeing.
1) create aspx page that loads data into a public variable declared in a
public module and.saves that variable into the session with the
session("X") = Variable also place a link button on page to goto page 2.

2) Create ASPX page 2 and in debug mode set break points before you start
processing this page.

3) run page 1 click on link on page and when you hit debug link on page two
check the value of the public variable. I am seeing the data stored in it
on page one without having to do an assignment statement (i.e. public
variable = session("X")). This does not seem right to me and I am wanting
to know is this by design or is this "Feature" that should not be counted on
to work the same way every time.

Thanks again.

"KJ" <n_o_s_p_a__m@xxxxxxxx> wrote in message
news:1137781097.282232.124490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> The members of a module are implicitly marked Shared. What this means
> is that these members have the same lifetime as Shared members. A
> Shared variable has only a single lifetime, which lasts for the entire
> time your application is running.
>


.



Relevant Pages

  • Re: Remote Desktop Shadowing for Non-Adminsitrators
    ... attempting to shadow a console session must be a member of the ... > Does anyone know a way to grant console shadowing through Remote ... > I have setup TCP-RDP permissions to allow members of a domain group ...
    (microsoft.public.windows.terminal_services)
  • Re: Yet another OO question...
    ... one of the main problems I've got understanding OO (and teaching ... That is, the only values that should be used in any method are the instance members of the class you're operating in, and the parameters to the method. ... Try to keep all of the members of a class focused on a single purpose. ...
    (comp.lang.java.programmer)
  • Re: ADUC Queries - Members of Security Group
    ... understanding of how this technology works. ... formats and it appears all of the wrong ones. ... To retrieve user members I would suggest: ... However, to retrieve members of any class (users, contacts, groups, ...
    (microsoft.public.windows.server.active_directory)
  • Struts 1.2 - HTML:SELECT problem
    ... So the attribute members has data. ... private String staff_number; ... Session session = null; ...
    (comp.lang.java.programmer)
  • Re: How to effectively use BeginRange / EndRange .. for records paging?
    ... You probably shouldn't even need a session cache for this... ... Please do not send email directly to this alias. ... > To pre-fetch the dimension members ... > set, like the above query, to benefit from the pre-fetched ...
    (microsoft.public.data.xmlanalysis)