Will my shared variables loose value? (asp.net vb)

Posted by Phil on Stack Overflow See other posts from Stack Overflow or by Phil
Published on 2010-03-16T06:43:08Z Indexed on 2010/03/16 6:46 UTC
Read the original article Hit count: 159

I have a class includes.vb that holds some variables (sharing them with other pages) like:

Public Shared pageid As Integer = 0

I then have a function that does some work with these variables returning them with values;

Return pageid

When I step through the code, the variables have values (while stepping through the function), but when they are returned to the page, they come back null.

Do they loose value everytime a page is loaded? Can you suggest an alternative method?

Thanks a lot.

© Stack Overflow or respective owner

Related posts about includes

Related posts about classes