473,406 Members | 2,847 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,406 software developers and data experts.

Data being lost when screen sequence is repeated

63
I set up a sequence of asp pages, which pass a variable containing the name of the initial page through the sequence. In this way I can insure that the user cannot open the maintenance pages directly, but must go through the login page first. The sequence goes as follows: MASLogin.asp, MASMaint_01.asp, MASMaint_02.asp, and MASMaint_03.asp. At the end of the sequence, the user clicks the Exit button on page MASMaint_03. This button calls up page MASMaint_01.asp which allows the user to enter another record. The code in question is listed below:

On page MASLogin.asp:
strSendForm = “MASLogin.asp”
<input id="SendForm" name="SendForm" type="text" value="<%=strSendForm%>"</td>

On all other pages:
strSendForm = Request.Form("SendForm")
<input id="SendForm" name="SendForm" type="text" value="<%=strSendForm%>"</td>

Everything works fine through the sequence, however, when the user goes to enter a new record on page MASMaint_01, the variable no longer contains the data. It seems that when you call up a sequence of screens and then begin back on the first one, something must be cleared out of memory for it to work properly. Does anyone have any ideas?
May 19 '08 #1
4 1477
DrBunchman
979 Expert 512MB
Hi rmurgia,

How does the button on MASMaint_03.asp load up the first page? Is it a submit button for a form that points to that page?

Or are you using a redirect?

Dr B
May 20 '08 #2
jeffstl
432 Expert 256MB
I set up a sequence of asp pages, which pass a variable containing the name of the initial page through the sequence. In this way I can insure that the user cannot open the maintenance pages directly, but must go through the login page first. The sequence goes as follows: MASLogin.asp, MASMaint_01.asp, MASMaint_02.asp, and MASMaint_03.asp. At the end of the sequence, the user clicks the Exit button on page MASMaint_03. This button calls up page MASMaint_01.asp which allows the user to enter another record. The code in question is listed below:

On page MASLogin.asp:
strSendForm = “MASLogin.asp”
<input id="SendForm" name="SendForm" type="text" value="<%=strSendForm%>"</td>

On all other pages:
strSendForm = Request.Form("SendForm")
<input id="SendForm" name="SendForm" type="text" value="<%=strSendForm%>"</td>

Everything works fine through the sequence, however, when the user goes to enter a new record on page MASMaint_01, the variable no longer contains the data. It seems that when you call up a sequence of screens and then begin back on the first one, something must be cleared out of memory for it to work properly. Does anyone have any ideas?
Values are not cleared from memory unless the session is stopped or you tell them to clear in code.

Need to see how you are directing the user to the first page. Is your variable spelled correctly for that redirect?

Do you have a form action= to what? The first page?

The form action determines what page the user is directed to when you submit via a button.

If you need them to go to the first page then just have your form action="<%=strSendForm%>" but this also means any save code you have will need to be run on that form too.

If you have your save code on the 03 page then after its done saving you need to have a response.redirect(strSendForm) after its done

Also another note, you can keep your passed variable hidden from user modification, which could be another problem if that text box is getting blanked out by a user typo.. if you use:
Expand|Select|Wrap|Line Numbers
  1. <input id="SendForm" name="SendForm" type="hidden" value="<%=strSendForm%
  2.  
May 20 '08 #3
rmurgia
63
Hi rmurgia,

How does the button on MASMaint_03.asp load up the first page? Is it a submit button for a form that points to that page?

Or are you using a redirect?

Dr B
Jeffstl, Dr. B,

Thank you for your responses. I again checked by code and determined what happened. I used embedded VB code but did not extend the end of the code beyond where the variable was referenced. When I extended the code, it worked. Reading both of your responses prompted me to look closer at the code to see how I missed the obvious.

Thanks again.
rmurgia

Before the change
Expand|Select|Wrap|Line Numbers
  1.  <% 
  2. Main Procedure
  3. Sub Main Procedure
  4. (Variables were created here)
  5. End Sub
  6. %>
  7.  
HTML with embeded variables <%=strSendForm%>
(Variables were used here and not being populated)
-----------------------------------------------------------------
After the change
Expand|Select|Wrap|Line Numbers
  1.  <% 
  2. Main Procedure
  3. Sub Main Procedure
  4. (Variables were created here)
  5. %>
  6.  
  7. HTML with embeded variables <%=strSendForm%>
  8. (Variables were used but are now being populated)
  9.  
  10. <%
  11. End Sub
  12. %>
  13.  
May 21 '08 #4
DrBunchman
979 Expert 512MB
Glad you got it sorted and thanks for printing the solution.

Dr B
May 22 '08 #5

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

Similar topics

2
by: Sonoman | last post by:
Hello everyone: I am new to Visual Basic and I have a problem that I cannot put my finger on. I am working on a school project and I am getting some serial data from a microprocessor. I have...
0
by: merdaad | last post by:
I am doing a database search from inside my class (vb) file. I get back lines of data which I would like to display in a new HTML page. After I complete my search and find the records, I want...
6
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i...
9
by: Code4u | last post by:
I have an application that manipulates large arrays of image data of various types, all the usual arithmetic operations on the data objects are supported. With careful design and tricks similar to...
5
by: My4 | last post by:
Dear Sirs, I want to give the user of my intranet a warning that if he uses the explorers right corner 'X' to close the browser he looses his information. I tried to prevent him from closing, or...
1
by: itm | last post by:
I have merged the data from Access. Now I need Word to start a new page every time the sequence number changes. How is this accomplished? Also, is it possible to tell Word to hide duplicates? ...
6
by: trbjr | last post by:
Hello experts, I want to describe a project design and then ask some questions at the end. There is no code in this discussion, just symbols to illustrate an idea. Let S stand for a screen...
0
by: sporob | last post by:
Issue: Each webpage/screen in our project has a corresponding WCF class and also a proxy is generated per class. We are inheriting Data Contract declared in a common WCF class, though WCF allows...
1
by: zoukli | last post by:
Hi guys, I'm experiencing the FRM-92100 error when running one of my screens in web. I use forms 6i with oracle DB 8i. My form is called by another form. And the problem occurs exactly when i try...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.