473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why is my app losing page variable values?

So to pretty much make this short and sweet, I have a page variable defined outside of all my methods and functions called buttonpressed. It is used to keep track of which button has been pressed on the app. For example, in the onclick event of my Edit button there is a line:
Expand|Select|Wrap|Line Numbers
  1. buttonpressed = "Edit"
  2.  
I use this to decide what kind of query to perform to my database. My problem is whenever I hit my save button(which uses that buttonpressed value in an if statement to decide what query to perform), the variable value just magically disappears.

I tracked the value to make sure that it is being changed and store correctly based on my add, edit, and delete buttons. As soon as I hit my save button, the value of that variable goes blank. Any help would be appreciated because as of now im using a hidden field to store this buttonpressed value.
May 12 '10 #1

✓ answered by ThatThatGuy

@benwizzle
Store the buttonPressed value in Session Variables

2 1533
ThatThatGuy
449 Expert 256MB
@benwizzle
Store the buttonPressed value in Session Variables
May 13 '10 #2
That worked thank you :)
May 13 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michael Krasnyk | last post by:
Hi, How can I print variable values by their names? For example: import sys for str in dir(sys): print str Will be printed only variable names, but I need values from list of variable...
8
by: deko | last post by:
Is there a rule of thumb for quoting variable values? For example, do I have to put all string number values in quotes? strAbc = "3" ? What about long, int and byte? I assume these are NOT...
6
by: msigwald | last post by:
The following line of code works, however, since my professor is a real purist of c, I would like to know if this code is valid (is it good code or a piece of crap?): #define DMP_FILE argv ...
3
by: Ron Wallegie | last post by:
I developed a webesite using c#. I have a dropdownlist wich is filled with database values. When i click on a button on the same page all values are lost in the dropdownlist. The most common...
4
by: Stephen | last post by:
I have a .NET (1.1 framework) application that is losing a session variable on only a few PC's. The main page is loading up in a frame in a Portal application. On the Page_Load it stores an...
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
5
by: Manuel Arroba | last post by:
I had the idea that two users code are being run by two different instancies, so from the variable values point of view they are complete independent. I have an asp.net that calls a module...
4
by: psbasha | last post by:
Hi, How to check the class attributes/member variable values while debuging in 'PythonWin'?. I need to watch all the member varibales values of a class ,given the object or etc. Thanks PSB
1
by: Looch | last post by:
I've run into what seems to be an issue with persisting state. I'm new to ASP.NET but have been using C# for a while now. I'm coding a button_click method in the .cs file for a web page and trying...
5
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.