Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 April 8th, 2004, 10:04 AM
Authorized User
 
Join Date: Aug 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Default behavior of global variables on postback

If I have an object instance initialized in global scope (so I can access it from any method with 'this.' syntax), is it preserved between postbacks?

TIA

 
Old April 8th, 2004, 02:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No, you have to store the value in the session, cache, or viewstate, even at page level scope.

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
global variables Komila ASP.NET 3.5 Basics 2 October 31st, 2008 01:14 PM
Global Variables in C# su C# 2 December 11th, 2006 06:18 PM
Global variables zarol Beginning PHP 3 May 10th, 2005 06:17 AM
Global Variables in .NET mbmsecret C# 5 July 6th, 2004 02:27 AM
Global variables ps124 ASP.NET 1.0 and 1.1 Basics 6 April 6th, 2004 02:48 PM





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