473,785 Members | 2,218 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Back Button - Retain Values On Re-Submission

Hi,

Any help or suggestions on this one would be gratefully appreciated:

I have 2 aspx pages one is called 'Query' and the other 'Details'. Query
page has a number of text boxes and drop down's for parameter selection, a
'Search' button and a grid that displays the results (the results contain
links to 'Details' page with query string params). The 'Details' Page
allows user to see detailed information on the selected product.

Okay my problem is this:

User types a product name into a text box in 'Query' page then clicks
'Search' button a postback on the page occurs then displaying the results in
the grid. User then clicks on one of the links in the results grid and the
'Details' page opens up. User then clicks 'back' button on their browser,
the 'Query' page is reshown with the previously entered text still
showing -> all is fine at this point. Then user selects a 'year' drop down
on the 'Query' Page (so they have as search parameters 'product name' in a
text box and and 'year' in a drop down). User then clicks 'Search' button.
Incorrect results are displayed and the 'year' drop down reverts back to
it's default value.

Behind the scene:
Whilst debugging I noticed after a user has selected the 'back' button,
selected 'year' and the 'search' button:
1. IsPostBack is False (obviously the page thinks it's 'new' which I gather
would be correct by design).
2. Whilst breaking on page load event and adding a watch on the 'year' drop
down it does not retain the newly selected value (it goes back to it's
default).
3. My click event for the button is not fired AT ALL).

Can anyone suggest how I can get around this? I need my click event to fire
so the correct db routine is called, grid populated correctly, etc.
Also how can I force the retaining of the 'year' selected value?

Basically i would like my user to be able to continue their searching where
they left off. I have considered using session variables for re-selecting
the correct parameter value, but there are quite a few controls and would
prefere a more elegant solution if anyone can think of one - plus I need my
click event to fire.

Many thanks

Tash
Nov 19 '05 #1
3 2410
Do you have smart navigation enabled. If so try to disable it and try
again. I suspect it could be due to smart navigation.

Regards,

Trevor Benedict R
Microsoft Certified Solution Developer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #2
Hi Trevor,

Thanks for your reply. Smart navigation is definately not enabled -> no
references anywhere in my project to it.

Any other ideas?

Many thanks

Tash
"Trevor Benedict R" <tr********@yah oo.com> wrote in message
news:e2******** ******@tk2msftn gp13.phx.gbl...
Do you have smart navigation enabled. If so try to disable it and try
again. I suspect it could be due to smart navigation.

Regards,

Trevor Benedict R
Microsoft Certified Solution Developer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 19 '05 #3
See if this helps.
http://www.dotnetbips.com/displayarticle.aspx?id=288

Once the users force a post, the View State should be accurate.

HTH

Trevor Benedict R
Microsoft Certified Solution Developer

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2627
by: siliconmike | last post by:
Do most browsers retain form fillup memory of previous page ? That is when the user presses back button, the forms on the previous page come up filled. Comments? Thank you, Mike
1
5502
by: J P Singh | last post by:
I have simple form where user enter the search criteria and the form is posted back to itself and runs a query based on the values that are entered. Everything is expect the values that the user enters disappears everytime the form is refreshed when posting it to itself. Is there anyway I can retain the values that were entered on the form?
4
6302
by: Jonathan Strange | last post by:
I have a website that uses Forms, and if I complete the form fields, submit the form, realise that there was an error or omission, and then hit the Back button, the form fields are all empty. This is extremely frustrating. However, what's more frustrating is that this behaviour doesn't happen all of the time - sometimes the field contents will still be there, and other times the fields will be empty. Also, sometimes the one form will...
1
2131
by: RC | last post by:
I have an Access 2002 database with many tables and forms (but just to keep things simple, let's say the DB has one Table "Table1" and one Form "Form1"). I have managed to cobble together so much complex code to add records and edit records I need to step back and ask you all what is the proper way to do this. The database is DAO. The table has Columns SerialNumber, CPU, HardDrive and Model. I am trying to use a Form to fill out the...
29
4079
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. The submit button posts the page back to the server. The button code detects an entry error and sends the page back to the user. This all works. However, if the user presses the Back button at this point, we go back and all the form values are...
3
6777
by: Alan | last post by:
I have a form that contains many fields for the user to enter. After entering the data the user can click a link to open a new window, the new window contains six columns (pull down menu) and 30 rows to allow user choose their options. <SCRIPT LANGUAGE="JavaScript"> function win(QID) { msg=window.open("QuotationPE.asp?QID=" + QID ,"","height=600,width=800,left=80,top=80, scrollbars=yes"); }
7
2488
by: Sridhar | last post by:
Hi, I have a question regarding the Page_Load method and Back Button of Internet explorer. I have created a webform. In that webform I have several Text Boxes. Also I have two buttons. When I click on button1, it populates the text boxes with person1 details. When I click on button2, it populates the text box with person2 details and redirects to webform2. In webform2 if I click on Back Button of Internet Explorer it should display...
4
2061
by: jay_dev | last post by:
i have this slight of problem my page displays a div tag each time a new info is inserted but if i hit the back history button,move back to an earlier page then come back to the one i was working on, the divs are no longer displayed is there a way to retain them like in the browser's cache or elsewhere ? I Need to accomplish this fast please !!
1
3128
by: Janroel | last post by:
Hi all, I have 2 webservers running IIS 6.0, and I use forms with get and post. When a form is sent, and the user hits the browser back button: Webserver 1 redisplays de original form data in the form (IIS log file show no new entry), so probably the form/page was cached somewhere Webserver 2 empties the original form (IIS log shows a new entry: that the form/page was accessed). This happens with identical pages/forms. The pages are...
4
2148
by: PM ArunKumar | last post by:
i have two dropdown list in my form where the values in the list of second drop down changes based on the value i select in the first dropdown.(very similar to country and states list), here after submitting the form, if i go back the value which i selected in my second dropdown list doesn't appear. for eg: if select USA and virginia ,when i go back USA appears but virginia doesn't appear in my page. can any help me to retain the value....
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.