Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can I use static variable in web application?
Posted

1 solution

Yes - but it may not do what you think it might.
If you want to use it to "share" info between pages: no.
If you want to use it to "share" info between clients: no, or at least not reliably.
If you want to use it to "share" info between different class instances created on the same page, then yes.
 
Share this answer
 
Comments
Dj@y 17-Dec-14 8:22am    
in my application I have a class in that i user one variable as static and user1 accesses that and assign value to that variable and then
user2 accesses that same variable and assign value then user1 also got the user2's value so how can i avoid that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900