Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2004, 01:41 PM
Registered User
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Static members global to client apps

Thanks in advance for any help. I'm using asp .net with c#.

I'm finding the value in a static member in a webform class is showing up in every client (browser instance). This is very dangerous. I thought a static would not be global to every webapp instance on every machine accessing the server. Ex:
public class WebFormX : System.Web.UI.Page
{
  protected static string sCity;
}
// if client instance 1 sets sCity="miami" then all other client instances get sCity="miami" on their next refresh. I realize we're dealing with server variables but there must be a way to keep static values unique to each session. - How?

Thanks.















Similar Threads
Thread Thread Starter Forum Replies Last Post
How to declare the global variable in global.asax? calyn_gately ASP.NET 3.5 Basics 0 August 6th, 2008 08:06 PM
No global.asa activity when client is a VM Maugris Classic ASP Components 1 February 21st, 2008 04:16 PM
non-static reports to static html files miamikk ASP.NET 2.0 Basics 0 June 4th, 2007 01:48 PM
Callin Static Members from .NET Dll in VBA syoguran VB How-To 0 March 13th, 2006 04:37 AM
A problem with static data members in c++ amotsn C++ Programming 2 August 20th, 2003 02:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.